A knock-out championship match that ebbed and flowed relentlessly for more than more than 100 minutes was finally settled by the last kick of a penalty shoot-out in front of 13,955 spectators in Castlebar, with Derry advancing past Mayo after finished level after extra-time.
This All-Ireland preliminary quarter-final was hanging in the balance right until the moment that Derry's Conor Doherty slotted his team’s fifth penalty kick past Mayo goalkeeper Colm Reape.
The ball hitting the net was the cue for Doherty and his Derry team-mates to celebrate a famous victory for Mickey Harte’s team as they booked their place in next weekend’s All-Ireland quarter-finals at Mayo’s expense.
The homeside were left heartbroken after seeing victory slip through their fingers at the end of normal time; a Ryan O’Donoghue penalty had helped Mayo to lead by 1-8 to 0-10 five minutes into added time and Kevin McStay’s men seemed set to see the game out.

However, they allowed Derry to engineer one last attack and veteran full-back Chrissy McKaigue popped up to palm over an equalising score to send an enthralling contest to extra-time.
Under the MacHale Park floodlights, which had to be switched on due to the dark and dreary conditions, the Oak Leaf county had the better of the early exchanges in extra-time.
Early points from the outstanding Brendan Rogers and the influential Ethan Doherty (2) left the underdogs ahead by 0-14 to 1-9 at the interval.
But Mayo were in no mood to give in and the second half of extra-time was as frantic as it was tense with the Westerners reeling Derry back in thanks to scores from substitute Paul Towey and Conor Loftus that set up a grandstand finish.
Shane McGuigan also landed a superb score down at the other end as both teams went for broke, but with the finish line in sight, there was still more time for drama.
Ryan O’Donoghue missed a free from a very tight angle that would have levelled the game but Mayo stuck to their task and conjured up an equalising chance deep in added time that was finished brilliantly by Jordan Flynn.
That meant that there was nothing else for it but a penalty shoot-out to decide who would progress to the last eight of this championship.

Cillian O’Connor, Diarmuid O’Connor and Conor Loftus all scored their penalties for Mayo but both Paul Towey and Ryan O’Donoghue missed.
Derry’s Ethan Doherty also saw his effort fly wide of the target, but Shane McGuigan, Conor Glass and Ciaran McFaul all converted before Conor Doherty slotted Derry’s final kick past Colm Reape to settle the argument once and for all.
Derry had been expected to crash out of the championship after a dramatic slump in form this summer, losing three games in succession to Donegal, Galway and Armagh.
But having ground out a win over Westmeath last weekend, Mickey Harte’s managed to find enough form to edge this arm-wrestle.
Derry played some of their best football in the first half with Lachlan Murray shooting four brilliant points from play to help the visitors into a 0-06 to 0-03 lead at half-time.
But Mayo came roaring back into contention in the second half with Tommy Conroy (2), Aidan O’Shea and Ryan O’Donoghue all hitting the target to get their comeback going.
O’Donoghue’s penalty on 45 minutes put Mayo in the driving seat but they were never able to close the game out and late scores from Shane McGuigan and Chrissy McKaigue kept Derry in a game that they eventually managed to win.
A second defeat of this championship campaign for Mayo means that they miss out on a place in the last eight of the All-Ireland series for just the second time since 2011.
Mayo: C Reape; R Brickenden, D McBrien, D McHugh; J Coyne, S Callinan (0-1), E McLaughlin; J Carney, M Ruane; S Coen, D McHale, J Flynn (0-2); A O’Shea (0-1), R O’Donoghue (1-4, 1-0pen, 3fs), T Conroy (0-2).
Subs: C Loftus (0-1) for McLaughlin (half-time); D O’Connor for McHale (53); E Hession for Coyne (58); C O’Connor for Ruane (67); B Tuohy for O’Shea (70); P Towey (0-1) for Brickenden (80); M Plunkett for Callinan (87).
Derry: O Lynch; C McCluskey, C McKaigue (0-1), D Baker; G McKinless (0-1), E McEvoy, C Doherty; C Glass, B Rogers (0-2); E Doherty (0-2), E Bradley, C McFaul; P Cassidy, S McGuigan (0-4, 2fs), L Murray (0-5, 1 mark).
Subs: E Mulholland for Bradley (44); D Gilmore for Doherty, C Murphy for Cassidy (both 67); N Toner for Murray, R Forbes for Baker (both 70); D Baker for Forbes, P Cassidy for Murphy (both 70, ET); C Doherty for Baker (83).
Referee: B Cawley (Kildare)
Watch every game from Euro 2024 on RTÉ2 and RTÉ Player as well as highlights and goals as they happen on RTÉ Sport digital platforms