The Spaniard’s current deal was set to expire at the end of the current season and he often teased that he would wait until then before deciding on his next move.
However, City confirmed on Wednesday that Guardiola has put pen to paper on a fresh deal at the Etihad Stadium.
“I am so pleased to be staying at Manchester City for another two years,” Guardiola said.
“I can’t say thank you enough to everyone at the club for trusting me. I am happy and comfortable here. I have everything I need to do my job as best as possible.
“I know the next chapter of this club will be amazing for the next decade. It happened over the last ten years, and it will happen in the next ten years because this club is so stable.
“From day one I felt something special being here. I cannot be in a better place.
“I still have the feeling there is more we can achieve together, and that is why I want to stay and continue fighting for trophies.”