Preston North End needed a stroke of luck to take all three points from a Barnsley side that played with ten men for over 80 minutes.
Tykes manager Andy Ritchie saw his goalkeeper Nick Colgan sent off for handling outside his penalty area in the eighth minute and then had to watch as substitute custodian Vito Mannone's error gifted Patrick Agyemang the only goal of the game.
There was little other action for the disappointing crowd of 11,728 to enjoy, but the home fans at least had the satisfaction of seeing Preston keep the pressure up on the other contenders for automatic promotion.
Certainly they will have left Deepdale more satisfied than Colgan, who saw his night's work come to an early end in controversial circumstances.
The Republic of Ireland international advanced to meet David Nugent's throughball as Agyemang raced on to it. He just managed to get a touch to it and push Agyemang wide, although the striker still managed to get a shot away into the side-netting.
Referee Richard Beeby called play back and, after consulting his assistant, ruled Colgan had deliberately handled outside his box and produced a red card.
That the referee had got the match-turning decision correct was of little consolation to Barnsley.
Preston initially struggled to make their extra man count and even when they started to take control, Nugent and Agyemang squandered several good chances.
Barnsley's Paul Hayes should have made them pay in the 28th minute, but mis-hit his shot straight at Carlo Nash, the home goalkeeper, when well placed.
It proved to be a costly miss as the Lilywhites took the lead moments later.
Simon Whaley fired over a cross from the right wing and Mannone, on loan from Arsenal, punched it straight against Agyemang and turned in horror to see it bounce over his goal-line.
Mannone went some way towards redeeming himself by tipping over a Matt Hill header as Preston looked to double their advantage, while Whaley also went close before half-time with a cross-shot which hit the post.
Barnsley had chances to equalise during a drab second half, but Brian Howard shot wide and Nash did well to deny Martin Devaney and Paul Heckingbottom.
Nugent was again guilty of some poor finishing after the break, twice missing the target after being played in by lively half-time substitute Danny Dichio, who had replaced Agyemang.
The England Under-21 international's profligacy could have proved expensive, but North End breathed a sigh of relief when the referee waved away a late Barnsley penalty claim.