Gabriel Jesus' injury-time winner took Premier League champions Manchester City to an unprecedented 100 points as Southampton secured safety despite the 1-0 defeat at St Mary's Stadium.
City's sensational season appeared to be ending with a stalemate, but Jesus brought down Kevin De Bruyne's pinpoint ball forward before lobbing Alex McCarthy to score their 106th league goal in the fourth minute of added time.
The victory sees Pep Guardiola overtake his own record of 99 points with Barcelona (2009-10), while City also break the record for the most away wins (16) and points (50) in the Premier League era, as well as the biggest winning margin (19 points). For good measure, they also achieved the most wins in an English top-flight season (32).
Meanwhile, Southampton survive by three points, with Swansea taking the finally relegation spot after losing 2-1 at home to Stoke.
With Swansea needing an escape act Houdini would have been proud of, Southampton knew it was about containment against City, no mean feat given the champions' haul of 105 league goals going into the match.
However, it was the Saints who went closest to breaking the deadlock early on, with Wesley Hoedt's header cannoning off the bar from Dusan Tadic's corner.
As news of Stoke taking a first-half 2-1 lead at Swansea filtered through at St Mary's, the home supporters finally broke out into chants of 'We are staying up!' - confident a 10-goal swing was now, finally, an impossibility.
After no attempts on target from City in the first half, they ramped up the pressure after the break, and went close to scoring just after the hour-mark, but Raheem Sterling saw his shot deflect onto the post before McCarthy tipped over John Stones' header.
After Fernandinho cleared Dusan Tadic's effort off the line, and following the introductions of Brahim Diaz and Phil Foden for City - who made their fifth league appearances of the season to earn winners' medals - it was the turn of another substitute, Jesus, to cap off City's remarkable season.
Following a campaign of free-flowing football, it was ironic, though somewhat fitting, that De Bruyne grabbed an assist with a long ball forward. Jesus' first touch miraculously brought it down, while his second deftly lifted the ball over McCarthy and into the net.
Cue scenes of wild jubilation, from the players, from the fans, and from Guardiola on the sideline. And with Southampton safe, there was cause for celebration from both sides as the full-time whistle sounded.
Opta stats
- Man City trailed for a total of just 153 minutes in Premier League matches this season - the fewest by a side in a single campaign.
- The Citizens set a new Premier League record for the biggest goal difference in a single season (+79).
- Before becoming Manchester City manager in 2008, Mark Hughes was unbeaten against them in the Premier League (W4 D4 L0). Since leaving, he's won only two of his 14 league meetings against the Citizens (D3 L9).
- Kevin De Bruyne provided more assists than any other player in the Premier League this season (16). He also set a record for most wins by a player in a single PL season (31).
Man of the match - Maya Yoshida
Despite City's record-breaking feats, Southampton deserve praise for not only securing safety, but also keeping the visitors at bay for the majority of the match.
City piled on the pressure in the second half, but Yoshida was central to Southampton's resistance, making a match-high nine clearances and four interceptions. Though Jesus stole a winner late on, it was a commendable display from the Saints defence.
The managers
Mark Hughes: "It has been a huge effort from everybody. It wasn't an easy situation that I found when I came here - clearly we had difficult fixtures as well, not least this one to finish.
"You always thought, 'Goodness me', we didn't really want it to come to this day and have to win, but I thought we played very well today and arguably had the better of it in the second half.
"But with the quality they have, it only takes one moment. Congratulations to City, they've been absolutely magnificent this season. For them to get all the records they've achieve this year, it's evidence of an outstanding team."
Pep Guardiola: "It's incredible. I don't have the words. 50 points at home, 50 points away. Incredible, incredible.
"Nothing changed but it's because we scored in the last second. It was similar (the last time) the last time we scored against Southampton. We won in the last minute.
"When you get to 100 points, it's something special for all the club. It's a record which will stay for long."