An official club statement read: “Manchester City can confirm that in recent weeks it has commenced and finalised contractual negotiations with Pep Guardiola to become MCFC head coach for the 2016/17 EPL season onwards.

“The contract is for three years. These negotiations were a re-commencement of discussions that were curtailed in 2012.

“Out of respect for Manuel Pellegrini and the players, the club wishes to make its decision public to remove the unnecessary burden of speculation.

“Manuel, who is fully supportive of the decision to make this communication, is entirely focused on achieving his targets for the season ahead and retains the respect and commitment of all involved with the leadership of the club.”

The news was announced at the end of a standard press conference to preview Tuesday’s Barclays Premier League game at Sunderland.

First Pellegrini, who signed a one-year extension to his original three-year contract last summer, announced his departure and that was quickly followed by the club statement.

Pellegrini said: “Before we finish I will tell you that I talked with the club and I will finish my contract on the original date in June. We extended the contract one year more but with the clause that one of the club or me may not use that extended contract. So, I will finish here on the original date, June 30.

“There has been a lot of speculation about things, but they (the club) are not doing anything behind me. I knew this one month ago. I don’t think it is good to have speculation about different things. I prefer to finish (by announcing) today – that is why I have told the press and told the players. I told the club two weeks ago that I would do it.”

Chilean Pellegrini, 62, succeeded Roberto Mancini as City boss in 2013 and guided them the Premier League and Capital One Cup success in his first season.

They failed to defend their title last season but remain alive in four competitions this term.

One interesting aspect of City’s statement is the admission that the talks with Guardiola began in 2012 – at a time when City had secured the Premier League title under Mancini on a dramatic final day of the season.

It was in the summer of 2012 that Guardiola opted to take a sabbatical from coaching before joining Bayern in time for the start of the 2013-14 season.

Guardiola announced just before Christmas that he would leave Bayern at the end of the season, with the German giants simultaneously confirming that former Chelsea and Real Madrid coach Carlo Ancelotti would succeed him.

Guardiola, who also had a distinguished playing career and was part of the 1990s Barcelona ‘Dream Team’ under Johan Cruyff, then announced his desire to coach in England last month.

City had always been perceived as favourites to win the race for his signature, with City football director Txiki Begiristain and chief executive Ferran Soriano having worked with Guardiola at Barcelona.

But Chelsea – who sacked Jose Mourinho in December after a dreadful start to their title defence – had also been linked with Guardiola along with Manchester United, whose manager Louis van Gaal is under pressure after some mediocre performances this term.