Mayo came from seven points down with nine minutes left to draw their All-Ireland SFC semi-final against Dublin.
Diarmuid Connolly notched as early penalty but the Dubs led only 1-7 to 0-7 at the break despite their domination as Cillian O'Connor hit six Mayo frees.
After Mayo cut the margin to a point, Kevin McManamon's goal on 57 appeared to have sealed a Dublin victory.
But Mayo refused to quit and O'Connor's penalty and Andy Moran's equaliser ensured next Saturday's replay.
After Moran's equaliser, Mickey Sweeney had a chance to snatch victory for Mayo while Dubs goalkeeper Stephen Cluxton, who had a nervous outing, then pushed a late 40-metre free wide.
Dublin look likely to be without Connolly for next weekend's game after he was sent off late in the contest following a tangle with Lee Keegan.
Mayo's fight-back keeps alive their chances of a first All-Ireland senior title since 1951.
Dublin will wonder how they failed to put the Connacht champions away after dominating the first half and then stretching their lead to seven with less than 10 minutes of normal time left.
Connolly's fifth-minute penalty put the Dubs 1-0 to 0-1 ahead after a charging Paul Flynn had been bundled over by Jason Doherty.
Mayo's main attacking tactic in the opening period was lumping high balls into Aidan O'Shea but it met with little success although the full-forward did have a strong penalty turned down when he appeared to be upended.
Only Dublin's defensive indiscipline kept Mayo in the game with Dubs backchat making a couple of O'Connor's frees easier as referee Joe McQuillan moved the ball forward.
Still at 1-7 to 0-7 ahead, Dublin looked in control at half-time but Jim Gavin's side lost their way in the third quarter as Mayo quickly reduced the gap to a single point.
However with O'Connor and sub Moran missing chances to level in the 50th and 51st minute, the match appeared to have slipped from Mayo's grasp six minutes later when McManamon stabbed the ball to the net after Robert Hennelly had blocked Brian Fenton's point-blank goal chance.
The goal left Dublin 2-9 to 0-10 ahead and the outcome appeared settled four minutes later as a Jack McCaffrey score extended the advantage to 2-12 to 0-11.
But Mayo refused to give up and points from Moran and Keith Higgins reduced the margin to five.
Dublin sub John Small made a brilliant goal-line block to deny Moran after Cluxton's attempted clearance had been charged down but the goal life-line did come for Mayo in the 69th minute with O'Connor slotting his penalty after Colm Boyle had been upended by Philly McMahon.
It looked a debatable call but O'Connor held his nerve and within seconds Mayo were on terms after a poor Cluxton kick-out was punished by Moran's equalising point.
After Sweeney's Mayo chance was blocked, Cluxton was handed his last-gasp free opportunity but he pushed his effort wide of the posts.