A goal from Galway’s Johnny Heaney four minutes into injury-time settled a tense and tight Connacht SFC quarter-final at MacHale Park, Castlebar.
The sides were deadlocked as extra-time loomed, but Galway managed to prise open Mayo’s defence with a neat attacking move and substitute Seán Kelly set Heaney up for an emphatic close-range finish.
Mayo did respond with a free from Cillian O’Connor, but Tom Flynn burst through to fist the insurance score for the Tribesmen seven minutes into added-time.
This was Galway’s fifth successive victory over Mayo in all competitions in the last two years, and they timed their late run to perfection again here in front of 29,449 patrons.
There was further bad news for Mayo, with Tom Parson’s season seemingly over after a suffering what looked to a be a serious knee injury in the second half.
However, they will wonder how things might have been different had they not played for more than 50 minutes with only fourteen men.
Last year’s beaten All-Ireland finalists had Diarmuid O’Connor sent off by referee Conor Lane in the half an hour in after he caught Galway’s Paul Conroy with an elbow to the face while in possession of the ball.
Mayo manager Stephen Rochford did re-organise his team at half-time, and the home side gave as good as they got throughout an absorbing second half.
But Galway finally made the extra man count in those dramatic closing stages with substitutes Eamonn Brannigan, Seán Kelly and Ian Burke all playing pivotal roles.
League finalists Galway had come into the game as outsiders with the bookmakers, but they came flying out of the blocks to lead by 0-5 to 0-2 after 19 minutes.
Playing with the aid of the strong wind, Kevin Walsh’s charges stitched together some flowing moves as Seán Armstrong, Damien Comer (2) and Barry McHugh (2 frees) all hit the target with style from distance.
Mayo’s opening scores came via a Conor Loftus free and a spectacular solo effort from Diarmuid O’Connor.
At the other end of the field they had deployed Keith Higgins as a sweeper in front of Galway dangerman Damien Comer who was also being marked by All Star Chris Barrett.
This tactic seemed to be paying off when Mayo put some early wayward shooting behind them to reel off three unanswered points from Conor Loftus (a brace of frees) and Kevin McLoughlin to tie the match up for the second time after 25 minutes.
Seconds later though Galway eased ahead again through Shane Walsh as they demonstrated their deadly counter-attacking capabilities.
It was the red card for Mayo’s Diarmuid O’Connor that proved to be a watershed moment.
The sides traded points before the interval through outstanding Galway midfielder Ciaran Duggan and Footballer of the Year, Andy Moran.
But it was Galway who held the numerical advantage as well as the lead - 0-7 to 0-6 - at the change of ends.
The second half was an extremely tactical and slow-burning affair as both sides waited for the other to blink.
Mayo started with a lot of energy and hit the front after Higgins and Parsons picked off points inside the opening five minutes.
Shane Walsh then levelled the game again with a neat point from play as things started to take shape.
But a serious knee injury for Mayo midfielder Parsons minutes later was another big blow to his team’s ambitions.
The Charlestown clubman was stretchered from the field after twisting his leg awkwardly as he fell.
The atmosphere and tempo of the game lifted noticeably during the last quarter and the sides traded points three times as the status quo remained heading into stoppage time.
A levelling score from Kevin McLoughlin in the first minute of added time left the teams deadlocked for the seventh time.
But any thoughts of extra-time were dispelled when Johnny Heaney burst through to fire the winning goal past David Clarke.
Galway will now play Sligo in the Connacht SFC semi-final on Sunday, June 3 while Mayo must face into the All-Ireland Qualifiers again, beginning on Saturday, 9 June.
Galway: R Lavelle; D Kyne, SA Ó Ceallaigh, E Kerin; G O’Donnell, G Bradshaw, C Sweeney; T Flynn (0-1), C Duggan (0-2); S Walsh (0-3, 1f), P Conroy, J Heaney (1-0); S Armstrong (0-1), D Comer (0-2), B McHugh (0-2, 2fs).
Subs: P Cooke for Conroy (inj); E Brannigan for Kyne; I Burke for Armstrong; S Kelly (0-1) for Flynn; J Duane for Bradshaw; A Varley for McHugh; T Flynn for Cooke (black card).
Mayo: D Clarke; E O’Donoghue, C Barrett, K Higgins (0-1); C Boyle, S Coen, P Durcan; T Parsons (0-1), S O’Shea; K McLoughlin (0-2), A O’Shea, D O’Connor (0-1); C Loftus (0-3, 3fs), A Moran (0-2), J Doherty.
Subs: C O’Connor (0-1) for Parsons (inj); D Drake for Loftus; J Durcan for Doherty; C Hanley for S O’Shea; D Vaughan for Moran; B Harrison for O’Donoghue (inj).
Referee: C Lane (Cork)