Cillian O'Connor's point deep in added time earned Mayo a 0-15 to 2-9 draw with holders Dublin in Sunday's All-Ireland SFC final at Croke Park.
The Connacht men hustled and harried the Dubs but own goals from Kevin McLoughlin and Colm Boyle saw them trail 2-4 to 0-5 at the break.
Mayo hit five straight points on the restart to level although Dublin moved three clear late on.
The gap was reduced to one before O'Connor's crucial equaliser.
Mayo started as underdogs although they made an impressive start in their bid to win the Sam Maguire Cup for the first time in 65 years.
Scores from Tom Parsons and O'Connor gave Mayo an early lead but they were soon behind when McLoughlin diverted Bernard Brogan's shot into his own net.
O'Connor levelled but misfortune struck again for Mayo with Boyle's leg propelling the ball into the net as it slipped from the hands of Dublin forward Dean Rock.
It left the Dubs 2-0 to 0-3 ahead after 23 minutes although they lost James McCarthy to a black card two minutes later - he was replaced by Paddy Andrews.
Mayo stayed in touch until Andrews slotted over two points just before the interval to give Dublin a commanding half-time advantage.
That advantage was quickly wiped out early in second half thanks to points from Andy Moran and Paddy Durcin before three O'Connor scores.
The game became error-strewn as the rain fell although there was a dramatic finish at headquarters.
John Small put Dublin in front with four minutes and Jim Gavin's side looked set for victory when it was followed by Dean Rock and Diarmuid Connolly points.
Mayo were three down but their cause was helped by having seven minutes of added time to pull off a late comeback.
O'Connor popped over a free before Donal Vaughan left just one point between the sides.
With just seconds remaining O'Connor cut inside and calmly slotted over to ensure a replay on Saturday, 1 October.
Kerry had earlier defeated Galway 3-7 to 0-9 to win a third successive All-Ireland minor title.