Sheffield Wednesday ended their eight-game winless run by stunning in-form Barnsley to claim a 2-1 Sky Bet Championship victory at Oakwell.
The Tykes had stormed into the play-off places with nine wins in their last 10 matches - drawing the other - but a Jordan Rhodes double saw Darren Moore's strugglers claim the win despite Carlton Morris' strike late in the second half.
Wednesday remain 23rd, but closed the gap to 21st-placed Birmingham to six points. Barnsley remain fifth as they continue to push for a Championship play-off place.
The hosts started out on the front foot with striker Daryl Dike the first to test the Owls' back line, heading wide early on from Alex Mowatt's cross.
Michael Sollbauer followed moments later with an effort on the edge of the six-yard box but the Austrian defender failed to keep his shot on target.
The visitors squandered a huge chance on 20 minutes. Rhodes beat Brad Collins to Julian Borner's pass over the top but, after rounding the 'keeper, the Scot could not capitalise as he dragged his shot wide.
Piling on the pressure, Dominik Frieser tried his hand at goal as the Tykes searched for an opener, the midfielder launching his volley wide with the break fast approaching.
Rhodes broke the deadlock in the 38th minute. Owls captain Barry Bannan put the ball on a plate for his attacking colleague to deliver a bullet header beyond a helpless Collins as the relegation battlers took the lead at half-time.
Tykes boss Valerian Ismael made a triple change following the interval. Aapo Halme, Toby Sibbick and Morris replaced Romal Palmer, Sollbauer and Frieser.
Rhodes bagged a second goal as he doubled his side's lead in the 53rd minute. Josh Windass was unselfish with the assist and squared the ball across goal for the forward to apply a simple tap in.
Windass had the chance to put the game to bed with the clock running down but the attacking midfielder struck wide of the near post from a tight angle on the left-hand side.
Barnsley's Morris pulled one back in the 78th minute after latching onto Halme's headed pass and beating Joe Wildsmith with a smart volley on the turn.
Mowatt had a chance to salvage a late point but blasted his free-kick over Wildsmith's cross bar.
What the managers said...
Barnsley's Valerien Ismael: "We are disappointed to lose the game, especially when it's a derby game. We know what it means for our fans. We have to stay fair and say that Sheffield Wednesday were better and deserved to win.
"You could see that fatigue impacted the game today. We made two mistakes for the goals and it's all about tiredness and concentration. That's why it was such a difficult game. Even though we played badly, we should have been awarded two penalties. If the referee did his job, then maybe we could have won or at least stayed in the game."
Sheffield Wednesday's Darren Moore: "I'm really pleased for everyone at the football club to get three much-needed points today. We wanted to finish the week strongly and I thought that we did that. Looking at the performance, we knew that we had to come here and be strong, resolute and dependable.
"I thought there was times in a frantic match where we put our foot on the ball and I was really pleased with the result. Barnsley make it really difficult for teams coming here. We had to stand up against them and we did that."