Sheffield Wednesday raced into a 3-0 lead in 22 minutes at Accrington but were forced to hold on for a 3-2 win.
The Owls took the lead on 13 minutes when Barry Bannan's corner found Chey Dunkley who stooped at the far post to head into the bottom corner.
It was two on 20 minutes when Liam Palmer and Theo Corbeanu played a one-two with the Canadian forward driving the ball home.
On 22 minutes it was 3-0 when Palmer this time found Florian Kamberi in the area and he looped the ball over keeper James Trafford.
Stanley got one back on 33 minutes when Lewis Mansell's overhead kick, from a Sean McConville corner, squeezed into the bottom corner of the net.
It was 3-2 on 53 minutes when half-time sub Joel Mumbongo got the ball to the right of the area, turned and fired it into the roof of the net.
It needed a superb save from Bailey Peacock-Farrell to keep out a Harry Pell free-kick as the Owls held on for three points in their promotion push.