The Spaniard, whose new contract expires in 2021, had one year left to run on his previous deal which he signed upon arrival from Bayern Munich in June 2016.
“I am so happy and excited. It’s a pleasure to be able to work here,” said Guardiola in a statement on Thursday.
“I enjoy working with our players every day and we will try to do our best together in the coming years. As a manager, you have to feel good to be with the players – and I feel good.
“I will focus on the desire of my players to become a better team and every day that’s what I will try to do – to improve on the pitch and improve our players.
“We have a young squad with an average age of 23 and we want to keep taking steps forward and maintain the levels we’ve achieved this season.”
Talks between Guardiola and the club regarding an extension have been ongoing for a number of months, with City keen to continue their project under the former Barcelona boss.
Club chairman Khaldoon Al Mubarak is delighted to have tied the Spaniard down to a new long-term contract.
He said: “In his two seasons with us, he has fostered an incredible spirit within the squad and significantly contributed to our progress both on and off the field. In doing so he has embodied the passion and commitment we all have for the Club.
“I am very much looking forward to the continued impact of his work and to fulfilling our shared ambitions in the coming seasons.”
Following a debut season in English football without a trophy, Guardiola triumphed in the Carabao Cup with City and won the Premier League with a record points haul this year.
The new deal could take Guardiola’s total reign at City to five years – one more than his tenure at Barcelona.
Guardiola is currently on holiday and is due back when his side begin their pre-season work in July. City are set to travel to the USA to play fixtures against Borussia Dortmund, Liverpool and Bayern Munich.