Will Grigg ended 10-man Manchester City's bid for an unprecedented quadruple as League One Wigan Athletic stunned the Premier League leaders with a 1-0 win in the fifth round of the FA Cup.
Wigan famously beat City by the same scoreline in the 2013 FA Cup final before dumping them out of the same competition the following season.
Even so, the prospect of Paul Cook's current Latics vintage repeating the dose seemed a fanciful notion against a City team who have been imperious at home and abroad over recent weeks.
But Fabian Delph altered the complexion of the contest with a rash challenge on Max Power – the England international's first-half red card meaning his is set to miss Sunday's EFL Cup final against Arsenal and subsequent Premier League matches against the Gunners and Chelsea.
Referee Anthony Taylor approached Delph with a yellow card in his hand while being harangued by Wigan players and that seemingly contributed to the angry reaction from City's players and bench when the left-back's dismissal was confirmed.
As was to be expected given the abundance of excellent ballplayers in Pep Guardiola's side, the numerical disadvantage did not stop them dominating possession, but an error from Kyle Walker allowed Grigg to bring the house down 11 minutes from time and book a quarter-final home tie against Southampton.
Sergio Aguero almost gave City a third-minute lead but headed over when he stole in front of Dan Burn to meet Bernardo Silva's cross from the right.
Ilkay Gundogan then forced Wigan goalkeeper Christian Walton into a sharp save down to his right before the hosts showed their capabilities as an attacking force.
Right-back Nathan Byrne bustled into the box and a loose ball trickled under Danilo's boot, forcing Claudio Bravo to fling himself at Gary Roberts' feet.
More poor work from Danilo allowed Grigg to get the run on John Stones and fire into the side netting.
An apparent hamstring injury forced off former Manchester United midfielder Nick Powell, interrupting Wigan's momentum, and City should have led when record signing Aymeric Laporte failed to convert Gundogan's flick-on from Leroy Sane's 26th-minute corner.
A similarly glaring miss came when Fernandinho smashed Stones' knockdown over and City were left to regret such profligacy when their task became taller on the stroke of the interval. Walton saved well from Aguero and, after Wigan partially cleared the resulting corner, Delph dived in over the ball on Power to earn his red card.
The enraged Guardiola brought on Walker for Sane at the start of the second half, moving Danilo to the left-back slot Delph vacated.
Clear chances were proving hard to come by for the depleted City and Guardiola introduced Kevin De Bruyne with 25 minutes remaining.
Gundogan was unable to turn in De Bruyne's corner five minutes later and the Belgium midfielder's arrival lifted the intensity.
Aguero's touch let him down after De Bruyne raided down the Wigan left, leaving Grigg to cast himself as the match-winning striker when Walker inexplicably let Elder's pass run under his boot.
Still with plenty to do, the Northern Ireland favourite kept his cool to slot his seventh of the competition past Bravo and claim a place in FA Cup history.
Wigan survived a couple of late scares and the full-time whistle sparked wild scenes of celebration as many home fans jubilantly invaded the pitch.
Key Opta facts:
- Wigan have now beaten Manchester City each of the last three times they have played them in the FA Cup.
- Will Grigg scored his seventh goal in this season’s FA Cup – more than any other player.
- Pep Guardiola's side failed to score for only the third time in all competitions this season, with Wolves in the EFL Cup and Crystal Palace in the Premier League also keeping them at bay.
- The Latics have now progressed past Premier League opposition in the third, fourth and fifth rounds of the FA Cup this season.
- City have been knocked out of the FA Cup by a side from the third tier or lower for the first time since the third round in 2004-05 (a 1-0 reverse against Oldham Athletic).
- Fabian Delph's sending off was the ninth in all competitions for Manchester City under Pep Guardiola – only Watford (10) have seen more among Premier League clubs in that time.