Chesterfield held on with 10 men to secure a precious 2-1 win at Barnsley.
Lee Novak headed the Spireites in front before Adam Hammill's deflected effort brought the scores level
Jamal Campbell-Ryce was then sent-off before Ollie Banks scored the winner.
Gboly Ariyibi delivered a cross which went over everybody but Novak (57), whose header found the bottom-left corner, leaving Adam Davies helpless.
Hammill (75) equalised for the hosts when he went on a superb run through the middle before his shot from outside the box was deflected past Tommy Lee.
Campbell-Ryce (78) was then sent off after receiving two yellow cards in quick succession.
After some great work down the left, Ariyibi laid the ball into the path of Banks (81), who smashed it into the back off the net.
Barnsley threatened late on when Hammill ran across the box and saw his effort cleared off the line by Sam Hird as the visitors held on