Barnsley deservedly completed a double over Preston North End with a hard-working performance at Deepdale, securing a crucial 2-1 victory.
Darren Carter had an early ten-yard shot saved by Tykes keeper Luke Steele and in the 21st minute Steve Foster had a header saved after a left-wing cross.
Preston centre-back Youl Mawene had a header cleared off the line and then hit a weak shot wide of the right-hand post from close range, before Neil Mellor headed narrowly wide of the right-hand post after 26 minutes.
Barnsley opened the scoring in the 33rd minute when Mawene pushed Jon Macken 25 yards out and the resultant free-kick was hit right-footed into the top left by Diego Leon, an ex-Real Madrid academy player.
A cross from the left by Karl Hawley was headed over by Simon Whaley six minutes before half-time as the home side responded.
At the start of the second half Billy Jones, running down the right-hand side and nipping into the penalty box, had a shot which was blocked but then Jones in the 55th minute was adjudged to have fouled Jamal Campbell-Ryce in the penalty area and referee Mr Taylor awarded the spot-kick.
Ex-Preston striker Macken sent the keeper the wrong way with a right-foot shot low into the right corner to make it 2-0 to the visitors.
Preston immediately made a double substitution bringing on Lewis Neal for Whaley and Richard Chaplow for Darren Carter.
The Lilywhites were back in the game when an innocuous Chris Sedgwick right-wing cross was headed by Foster into his own net midway through the second half.
Sedgwick was booked for a foul on Kayode Odejayi after 74 minutes and Istvan Ferenczi replaced Macken two minutes later, with Michael Coulson also replacing Nigerian striker Odejayi.
Five minutes were added at the end, but Barnsley held out for a relegation-easing three points.