Kerry and Mayo will do it all again next Saturday after a thrilling All-Ireland semi-final draw at Croke Park.
Andy Moran netted to give Mayo the early advantage before Kerry hit back with a Stephen O'Brien goal.
Colm Boyle added a second Mayo goal but Kerry finished the first half strongly to leave it 2-5 to 1-8.
Johnny Buckley netted for Kerry and Mayo equalised in added time before Bryan Sheehan missed a last-gasp 55-metre free to win it for the Kingdom.
It was a thrilling encounter at headquarters with Mayo aiming to stay on course for a first Sam Maguire Cup success since 1951.
The Mayo management made the surprise tactical move of switching Aidan O'Shea to full-back in an attempt to curb the aerial effectiveness of Kieran Donaghy.
To an extent the ploy worked with O'Shea competing well in the air but Donaghy still made a massive contribution to the Kingdom attack while the Mayo star was a big loss to his side's offensive options.
Moran's early goal helped Mayo lead by four but Kerry scored the final four points of the points to go in level at the break.
As ever resilient, Mayo regrouped to lead by three helped by Boyle's goal but against the run of play, Buckley's goal helped the Kingdom take the lead after a botched kickout.
A dramatic finale saw Paddy Durcan equalise for Mayo three minutes into added time but there was still time for Sheehan to clinch victory for Kerry.
But the long-range fell short to the relief of Mayo, who get another chance next weekend to reach the decider.
Tyrone and holders Dublin will contest the other semi-final at Croke Park next Sunday.