Mayo have qualified for the second round of the All-Ireland Senior Football Championship Qualifiers following a 2-21 to 1-13 win over Derry at McHale Park.
However, it was anything like the scoreboard suggests as Derry led by two points with the game moving into injury time at the end of the second half before Patrick Durcan put just a point between the side.
Mayo thought they had won the game when Conor Loftus goaled in the 69th minute but with the next attack Derry found the net when Mark Lynch punched past David Clarke to level matters.
Both teams had chances to win the game but the closest came when Cillian O'Connor hit the post with the game deep in injury time.
Mayo led by 2-15 to 1-12 after the first period of extra time with the goal coming from Jason Doherty.
Derry were awarded a penalty but James Kielt's tame effort was turned around the posts by David Clarke.
Mayo kept tagging on the points through Aidan O'Shea, Jason Doherty and Diarmuid O'Connor as they ran out comfortable winners in the end but they also finished the game with fourteen men after Patrick Durcan was sent off for a straight red card.
MAYO: David Clarke; Brendan Harrison, Ger Cafferkey, Chris Barrett; Colm Boyle, Lee Keegan, Patrick Durcan; Seamus O'Shea, Tom Parsons; Fergal Boland, Diarmuid O'Connor, Stephen Coen; Kevin McLoughlin, Cillian O'Connor, Andy Moran.
DERRY: Ben McKinless; Niall Keenan, Brendan Rogers, Karl McKaigue; Ciaran McFaul, Chrissy McKaigue, Carlus McWilliams; Conor McAtamney, Danny Heavron; Ryan Bell, Niall Loughlin, Enda Lynn; Danny Tallon, Emmett McGuckin, Benny Heron.