Clive Platt scored an injury-time winner to give Coventry City a welcome three points at the Ricoh Arena this afternoon.
The game seemed destined to end as a stalemate before Platt's late effort snatched the win for Andy Thorn's men.
The visitors started the stronger and almost went one up when Korey Smith's intended cross looped over Joe Murphy but sailed wide.
Coventry began to play their way into the match after the first 15 minutes and Platt saw a header well saved by Luke Steele.
Alex Nimely could have given the Sky Blues the lead with five minutes of the half remaining, but the Manchester City loanee, after being put through on goal, lifted over the advancing Steele only to see his shot trickle wide of the far post.
The game continued at a leisurely pace in the second 45 and both sides would have taken a draw only for Platt to find the net just after the 90-minute mark.
Coventry leapfrog Portsmouth to 22nd with the three points while Barnsley remain 14th.