Pep Guardiola has signed a two-year deal that will see him remain as Manchester City manager until the summer of 2023.
The 49-year-old has won two Premier League titles, the FA Cup and three League Cups since joining in 2016.
Guardiola told City's website: "We have achieved a great deal together, scored goals, won games and trophies, and we are all very proud of that success.
"Having that kind of support is the best thing any manager can have."
The former Barcelona and Bayern Munich manager's previous deal was set to expire at the end of this season.
Guardiola's current five-year stay is already the longest commitment he has made to a team since becoming a manager in 2008.
If he sees out the contract, the Spaniard will overtake Joe Mercer and go second on the club's list of longest-serving post-war managers, behind Les McDowall, who took charge of 592 games between 1950 and 1963.
In total, City have won 181 of the 245 matches under Guardiola, a win rate of 73.87%.
Guardiola said: "We have had long talks this week together, we put [forward] both sides - to continue or not - and in the end we decided that the best for all of us is to continue because still we have the feeling that there is unfinished business and still there is something to do: continue what we have done in the last [few] years.
"I have the desire to help with all the fantastic players we have for the next years, especially for the fans - and we will feel proud of the way we play and the way we win.
"I would say that at this time, the reason I signed the contract is for our chairman. Especially for the conversations that we had. He convinced me that still we have to move forward, to try to do it, to continue what we have done in these incredible last four years together."
Chairman Khaldoon Al Mubarak added: "Pep's contract extension is the natural next step in a journey which has evolved over many years.
"It is a product of the mutual trust and respect that exists between him and the entire club. It also goes to the stability and creativity at the heart of our football operations.
"Importantly it is a validation of the football structure and philosophy that has been built over more than a decade and to which he has contributed so much."