Brentford moved into the League One automatic promotion places after an injury-time Sam Saunders penalty saw them defeat Preston.
Saunders converted the pressure spot-kick after he was brought down by former Bees player John Mousinho.
The winger came close to opening the scoring earlier but his free-kick was saved well by Declan Rudd.
Lee Holmes and Jack King saw efforts miss the target as North End lost for the first time under Simon Grayson.
Brentford move above Sheffield United following their heavy defeat at Stevenage, and lie two points off leaders Doncaster.
VIEW FROM THE DRESSING ROOM
Brentford manager Uwe Rosler told BBC London 94.9:
"I think the last two games have seen fantastic turnarounds and fantastic home atmospheres.
"We had a number of chances with 23 attempts and we kept knocking on the door. Eventually it would open and I think it was definitely a penalty.
"I said we are second to the lads but I said it's too early, we have to be there on the last game."