Matt Chatfield's Mansfield suffered injury-time heartbreak as Bridlington came from behind to snatch all three points at the Forest Town Arena.
The Bulls had led the tie through a sensational early wondergoal from Ross Duggan, but the Seasiders levelled through Niah Payne before a costly error allowed Billy Logan to tap home a very late winner.
AFC could have been ahead with not even a minute played, but Ross Duggan believed himself to be on the wrong side of the Bridlington back line after Jon D'Laryea's killer ball would have seen the striker clean through.
But the league's top-scorer soon repaid his team with a contender for the goal of the season, as he smashed a 30-yard rocket off James Hitchcock's crossbar.
It then appeared Duggan had inspired a few of his team mates - five minutes later defender Cameron Hough fancied his chances from a similar position but volleyed well over.
It was a game that Bridlington, being within touching distance of the top three, had down as a must-win, and the Seasiders began to mount immense pressure on the Bulls back four.
Billy Logan had the first of a series of chances, finding space on the edge of the area before seeing his low effort held by Hugo Warhurst.
Bridlington top-scorer Joe McFayden was the next to test the AFC stopper, sending a half-volley straight at Warhurst after following up on his own corner.
The visitors felt like a goal was on the way with countless corners whilst AFC were limited mostly to counter-attacks, and Chris Jenkinson came inches away from a leveller as he saw his back-post header cleared off the line.
Tom Waudby had a similar chance as the half drew to a close, as his header was flicked over the crossbar for a second consecutive corner.
The second half began in just as lively a fashion, and the Seasiders would have drawn level if one of their own bodies wasn't in the way of a close-range attempt.
The visitors then finally found a way through, as despite Hugo Warhurst's brilliant save to tip McFayden's fierce strike wide, Niah Payne pounced only seconds later to fire home the equaliser from 15 yards.
With their tails up, Bridlington sensed they could complete the turnaround and almost did so when Devonte Newman-Morton's wicked in-swinging cross was glanced narrowly wide by Logan.
Mansfield continued to contest for all the points, though, and Luke Walker came close to regaining the lead when he cut inside his marker and forced Hitchcock to parry his powerful low drive which was destined for the far corner.
Whilst legs began to tire, the tie showed no signs of slowing down - Duggan almost squeezed the ball into the near top corner from inside the penalty area before Warhurst pulled off another stupendous save to palm Newman-Morton's rifled effort wide of his far post.
With seven minutes of normal time to play, Tom Waudby almost scored a screamer of his own as the midfielder spotted Warhurst off his line but struck the crossbar from 40 yards out.
As the game was drawing to a close, it could have been either side who would come out on top eventually - substitute Gavin King had the biggest chance of them all for the Bulls on 89 minutes, firing over an empty net from just yards out after Duggan squared past Hitchcock.
The Seasiders then punished their hosts just as the game entered injury time, as Billy Logan pounced on a defensive mistake in the penalty area and tapped home to snatch the points.
The loss denied AFC a third win on the bounce, but Matt Chatfield's side have the chance to return to winning ways on Tuesday night when Maltby Main visit the Forest Town Arena.
Final score | AFC Mansfield 1-2 Bridlington Town
Scorers | Duggan (6') - Payne (55'), Logan (90'+1)
Bulls XI | Warhurst (GK), Hough, Slone, D'Laryea, Annable, Harrison (Wilson 56'), James, Buxton (C), Duggan, Ryan (King 77'), Walker (Webster 77')
Unused subs | Kozluk, McMillan
Yellow cards | Ryan (48')
Bridlington Town XI | Hitchcock (GK), Lewis, W. Waudby (Broadley 78'), Oliver, Jenkinson, Paprill (C), Payne, T. Waudby, Logan, Newman-Morton, McFayden (Mortimer 90'+3)
Unused subs | Adams
Yellow cards | N/A
Man of the Match | TBC
Attendance | TBC