Swindon Town striker Sam Parkin bagged a brace to keep his side's play-off hopes alive and inflict defeat on a Barnsley side that had not lost since November.
Parkin was on hand 14 minutes from time to head in Lee Holmes' cross to earn his side a deserved three points.
Swindon started brightly and almost took the lead on 11 minutes following a mistake by Barnsley defender Matt Carbon.
His stray pass went straight to Grant Smith and allowed the striker a shot on goal only for the ball to sail wide of the post.
But Carbon's blushes were only spared for two more minutes when another error by the centre-half allowed Parkin to open the scoring.
Carbon hit a long ball forward only for it to deflect off Swindon midfielder Holmes straight into the path of Parkin who curled a left-footed shot in from 18 yards.
Barnsley threatened to get back on level terms on 22 minutes when Daniel Nardiello's pass found Jacob Burns in space only for his shot to come cannoning back off the post.
The home side almost extended their advantage on 27 minutes with Parkin again in the centre of the action.
Grant's missed corner from the right found the striker unmarked six yards out and his header came back off the right-hand post before being cleared to safety.
But the visitors equalised soon after when the impressive Burns fired a shot through keeper Rhys Evans' legs following a low cross from Nicky Wroe.
Swindon's on-loan striker Jamie Slabber wasted two good headed chances after the break before beating the offside trap on 73 minutes and firing wide despite being one-on-one with keeper Ross Turnbull.
But strike partner Parkin was on hand to earn his side the points with a header on 76 minutes before Barnsley defender Tom Williams almost snatched an injury time equaliser when his corner from the right sailed just wide of the post.