Tranmere Rovers moved seven points clear at the top of League One, coming from 2-0 behind to defeat Yeovil Town.
Sam Foley set up Paddy Madden to put the visitors in front and Foley doubled the advantage from close range.
But James Wallace's header reduced the deficit and Jake Cassidy levelled for Rovers, following up after Adam McGurk's initial shot had been saved.
Yeovil then had Joe Edwards sent off for two yellow cards before Danny Holmes netted Tranmere's late winner.
From a quickly-taken corner, visiting goalkeeper Marek Stech denied a first effort from Holmes but was unable to keep out his second attempt.
With Stevenage losing at Colchester and Sheffield United dropping two points late on at home to Oldham, victory became even more valuable for Tranmere.
But the hosts had to recover from a shocking start. They were trailing by two goals inside half an hour, with Madden continuing an impressive start to his loan spell with the Glovers.
Fortress Prenton Park
Tranmere's last home defeat was a 2-0 reverse against MK Dons on 10 December last year
After Madden had found the net for a third time in two games, Yeovil looked on course for their first away points since 25 August.
But Tranmere, who were without prolific duo Jean-Louis Akpa Akpro and Andy Robinson because of injury, fought back strongly to avoid their first home defeat since December 2011 and extend their unbeaten run at Prenton Park to 18 matches.
VIEW FROM THE DRESSING ROOM
Tranmere Rovers manager Ronnie Moore told BBC Radio Merseyside:
"We were awful in the first half, but we showed a bit of courage, a bit of determination and a bit of togetherness.
"We got the goal just at the right time, just before half time, and at 2-1 I felt it was a game we could go on and win.
"That's not the way we've defended. You don't get six clean sheets in 11 games defending like that, and we won't get many more if we defend like that.
"But I have to give them a pat on the back for their never-say-die attitude. I'm pleased that 'Holmesy' got the goal for us at the end."
Sorry, we were unable to load match stats, please try again.