Saints looked set to become the first side in 100 days to deny swashbuckling City maximum points in the Premier League after Oriol Romeu cancelled out Kevin De Bruyne’s deflected free-kick.
But deep into stoppage time Sterling found space to bend home a stunning effort to secure a 2-1 victory – a club record 19th straight win in all competitions – and send the Etihad Stadium wild as Guardiola jumped for joy.
“Good night, yes,” a smiling Guardiola said, sporting a wet jumper from the dressing room celebrations.
“I think all the supporters create some special moments.
“Tonight in the last breath, in the last second, we enjoyed the situation, so you have to celebrate it.
“It was a good moment in the last minute.
“What happened in the locker room with all the staff, all the people, how happy they were that’s why our job makes sense. To enjoy this kind of situations.”
The unbridled celebrations after Sterling’s stoppage-time winner included Benjamin Mendy hobbling down the touchline with his City team-mates – just two months after rupturing the anterior cruciate ligament in his right knee.
Guardiola joked the “crazy” full-back’s decision was a “disaster”, but he too struggled to control himself.
“I said I apologise, I couldn’t control it,” the City boss said after referee Paul Tierney had a word with him having encroached on the pitch.
“I was so happy, like all the fans, all the players.
“I ran behind Raz (Sterling) but I am not quick enough or fast enough, but we were so, so happy.
“I could accept absolutely everything.”
Guardiola continued in animated fashion after the final whistle, when the City manager’s post-match conversation with Saints’ Nathan Redmond raised eyebrows.
“(I told him) how good a player he is,” he said of what had looked like a rather aggressive exchange.
“Last season he destroyed us here. I didn’t know him last season, I realised how good he is.
“Today he could not attack because they defend all the time, but that is what it is.
“I spoke with Oriol Romeu as well, with (Virgil) van Dijk and with my players as well.”
Southampton counterpart Mauricio Pellegrino was unaware of the incident with Redmond and unwilling to comment on Guardiola’s celebrations.
However, the former Argentina international did appear frustrated about the amount of stoppage time as five minutes were awarded and Sterling struck home in the 96th minute.
“I can’t say anything about that,” Pellegrino said. “I didn’t see too many actions to delay the game.
“Obviously just the change, but OK it is part of the decision of the referee.
“I can’t do anything about that, I have to respect (it).
“Obviously it is painful for us to concede one goal at the end, but I think we have to learn how to approach this type of moment for the next time.”
With incoming boss Sam Allardyce watching on from the stands at Goodison Park, Rooney scored from inside his own half in the 66th minute as he met Joe Hart’s clearance inside the centre circle and sent the ball straight in.
Asked if he had ever netted a goal better than that, the 32-year-old told BT Sport: “I don’t think so.
“It’s one of, if not, the best goal I’ve scored. I hit it as well as I’ve ever kicked a football. To make it my first hat-trick for Everton, I’m delighted.”
Captain for the night Rooney’s first goal came in the 18th minute as he headed in on the follow-up after his penalty was saved by Hart, and he slotted home his second 10 minutes later.
Jordan Pickford then saved Manuel Lanzini’s spot-kick just before the hour mark, and after Rooney’s outrageous effort from distance, Ashley Williams added a 78th-minute header.
The win, which moved Everton up from 17th to 13th in the Premier League, was only their second in eight matches since David Unsworth stepped up from the under-23s to take caretaker charge following the sacking of Ronald Koeman.
Allardyce, sat alongside Everton’s major shareholder Farhad Moshiri and chairman Bill Kenwright at the game, will surely have taken great encouragement from what he saw hours after the club had announced he was to finalise terms on becoming their new manager.
Rooney said of Allardyce: “Of course he’ll be pleased, but for us as a team, as a club, it was important for us to show some pride. As David Unsworth said, we’ve been hurting.”
He added: “We’ve got to give thanks to David Unsworth. He’s stepped in at a difficult time for the football club, he’s a true Everton person.
“I’m delighted for him we’ve got this victory because it’s an important win for the club but also for David Unsworth.”
Unsworth hailed Rooney’s “wonder goal” and said the former England captain was “probably the only guy on the pitch” who could score such an effort.
And regarding Allardyce, he said: “I had 10 minutes with him this afternoon at Finch Farm. He came in with (Everton’s director of football) Steve Walsh and had a look around.
“I’m sure I’ll have a more in-depth conversation with him in the next few days.
“I’m going to have a couple of days off and resume my role with the under-23s. That’s important to me.”
He added: “The board have made a decision and like any manager he needs to be afforded time and patience and given the chance and the backing from the whole football club. He certainly has my backing.
“We must back him and stick together as a club. We need to stick together and give Sam the time to get us up the league.”
Mohamed Salah didn’t start the game but came on in the second half to score twice and cap a good away performance for the Reds.
Here, we look at what we learned from the encounter.
STILL MANE ENOUGH
With Mohamed Salah’s sensational form for Liverpool this season, he may not be the outright main man anymore but Mane still has a huge role to play in the Reds’ campaign.
The Egyptian is new and exciting and boasts a serious goal threat but so does Mane. He’s stepped up and delivered for Liverpool time and again. He may not be enjoying as much of the limelight as he was before Salah’s arrival but against Stoke he re-established his status as a match-winner.
He was always dangerous running in behind a sluggish Potters defence, took his goal well and should’ve had another when he went clean through and hit the post. Mane also did brilliantly to set up Salah for the second with the substitute lashing in a volley in the 78th minute.
The Senegalese international was benched against Chelsea with Salah afforded a starring role in the front-line but three points against Stoke is just as important as the one they earned against the Blues and Mane played his part in securing them.
ONE FOR THE ROAD
Liverpool kept their first clean sheet away from home in the Premier League this season. In fairness, Stoke didn’t offer much of an attacking threat and Simon Mignolet did do his best to facilitate a capitulation when he took Mame Biram Diouf out on the edge of the box, risking a red card.
The Belgian only received a booking for the clumsy foul though and it must be said that the Reds largely avoided allowing the hosts too many chances to get back into it.
NO STOPPING MO
How do you stop Salah? That’s a question most Premier League defenders will be wrestling with these days. The Egyptian came of the bench on Wednesday to add another two to his tally, now leading the goal scoring charts with 11 strikes to his name.
Mane and co may have worn Stoke down but once Salah came on in the 66th minute, he went for the jugular mercilessly.
His vicious volley to make it 2-0 secured the points and his pace made Erik Pieters look a bit silly when he nicked the ball off him and slotted away the third to put some gloss on the scoreline.
Salah is an early favourite for Player of the Year despite Kevin de Bruyne’s performances and if he can continue this vein of form, no one would deny him the accolade come the end of the season.