The City manager's contract was due to expire at the end of this season, but Guardiola ended speculation about his future by agreeing to a deal that would bring him to 11 seasons in Manchester.
The Catalan coach has overseen a period of unprecedented dominance since joining City in 2016. He has gone on to win six Premier League titles in seven years and also lifted the Champions League among 15 major trophies at the club.
"Manchester City means so much to me. This is my ninth season here. We have experienced so many amazing times together. I have a really special feeling for this football club," he said.
"That is why I am so happy to be staying for another two more seasons."
Under Guardiola, City became the first team to win four-straight English league titles. He also led City to the treble in 2023, winning the Premier League, Champions League and FA Cup in one season - matching Manchester United's achievement in 1999.
His first priority, though, is simply to arrest the worst losing streak of his managerial career.
Four straight losses in all competitions have left four-time defending champions City trailing leaders Liverpool by five points in England's top flight.
City are out of the League Cup and have been humbled in the Champions League by a 4-1 loss to Sporting Lisbon in one of Ruben Amorim's final acts before taking over Manchester United.
Arne Slot is the man who's hunting down Man City at Liverpool. (AP PHOTO)
So Guardiola's rule appears to be under threat.
But we've been here before.
Whether Guardiola's current team - with key players ageing and or injured - has the ability to go again, is unclear. And anything other than victory against Tottenham on Saturday would raise more questions about City's title credentials.
Backed by the ruling family of Abu Dhabi, City have been able to spend billions of dollars signing the world's best players, but Guardiola's squad has still been stretched by injuries, chiefly to Ballon d'Or winner Rodri and Kevin De Bruyne.
In De Bruyne and Kyle Walker, 33 and 34 respectively, there are doubts about their ability to maintain the levels they have in the past.
Walker, once so dominant at right back, has started only six games this season. City, meanwhile, have looked vulnerable in defence, keeping just five clean sheets in 18 games.
De Bruyne's injuries have been mounting. After being sidelined for much of last season, he's made only five starts this term.
Phil Foden has also struggled replicate the form that saw him named footballer of the year last season, with three goals in 14 games.
Guardiola famously questioned his players' title credentials midway through the treble-winning year of 2022-23, describing City as a "happy flowers" team.
It challenged them to raise their game in the face of a challenge from Arsenal, who led the standings for much of that campaign.
It worked, with City going on to win the Premier League, Champions League and FA Cup.
New Liverpool coach Arne Slot has taken the fight to Guardiola right from the start this season.
Liverpool lead the way in the Premier League and the Champions League, with Slot winning 15 of his first 17 games since succeeding Juergen Klopp in the offseason.
Arsenal under Guardiola's former assistant Mikel Arteta were runners-up to City in the last two years. Though they've faltered this season, they're just four points behind City in fourth.
Chelsea are third, ahead of Arsenal on goal difference, under another of Guardiola's former assistants, Enzo Maresca.