Late goals from Oisin Mullin and Jordan Flynn propelled Mayo back into the All-Ireland SFC quarter-finals at the expense of Kildare after a 2-13 to 0-14 victory at Croke Park.

A modest crowd turned out to see the Westerners come back from being six points down after 44 minutes to launch one of their renowned comebacks and win in dramatic fashion.Mullin's goal on 62 minutes threw Mayo a lifeline and levelled the match for only the second time while Flynn’s goal arrived in bizarre circumstances deep in stoppage time.

The Mayo substitute lobbed Lilywhites goalkeeper, Aaron O’Neill, from long-range as Kildare were chasing a late match-winning goal themselves.Mayo’s second successive Qualifier victory means that James Horan’s unbeaten record in All-Ireland Qualifiers remains intact, but his team were made to fight every step of the way.

Kildare, who were attempting to bounce back from their Leinster Final hammering at the hands of Dublin, led at the end of a slow-burning first half by 0-8 to 0-5. Jimmy Hyland shot four of Kildare's points from frees with marauding midfielders Kevin O’Callaghan (2) and Kevin Feeley also on target, along with defender Darragh Malone. Lilywhites boss Glenn Ryan had made five changes in personnel in advance of the game, setting his team up to be much harder to break down.

As a result Mayo found it hard to make much headway, and they had to rely on scores from the likes of defenders Lee Keegan and Eoghan McLaughlin to stay in touch.

The effort from Mayo’s flying wing-back McLaughlin would have ended up in the net were it not for a brilliant save from Aaron O’Neill.

By half-time they had only created five of the 15 scoring opportunities they had created.

Oisin Mullen celebrates Mayo's first goal

The second half was a very different sort of game and took on a life of its own. Glenn Ryan, who had enjoyed championship success over Mayo back in 2010 when managing Longford, saw his team go for the jugular after the restart.

A string of points from Ben McCormack, Daniel Flynn and Jimmy Hyland pushed the underdogs six points clear after 44 minutes and they looked set to cause an upset. But Mayo stuck to their game-plan on a ground that has become their home away from home. A brilliant block from defender Enda Hession seemed to be the spark that ignited their comeback and an inspirational point from substitute Fergal Boland, along with terrific efforts from Lee Keegan and Diarmuid O'Connor saw them come roaring back into contention.

Oisin Mullin then pounced for the game-breaking goal before impact sub’ Boland put James Horan’s men in front for the first time in an hour. Another sub, Darren McHale, doubled their lead with a point from an acute angle before Jordan Flynn’s bizarre goal at the death sealed a dramatic win. Kildare, who had only won two of their previous 10 games at Croke Park going into last night’s match, exit the championship following successive defeats to Dublin and Mayo.

The westerners will be back in action in the All-Ireland quarters in two weeks’ time.

Watch Cork v Limerick (1.30pm) and Armagh v Donegal (4pm) live on RTÉ2, listen live on RTÉ Radio 1's Sunday Sport and follow live updates on RTÉ Sport Online or the RTÉ News app. Highlights of all the weekend's action on The Sunday Game, RTÉ2, from 9.30pm.