Malaga manager Manuel Pellegrini has confirmed he will leave the Spanish club this summer.
His announcement clears the way for a move to Manchester City, where he is widely expected to succeed sacked manager Roberto Mancini.
The 59-year-old announced his exit at an awards ceremony in Malaga, with the club confirming it later on Wednesday.
"I'm not leaving because of financial ambition, but because of a project that will let me feel fulfilled," he said.
"On Sunday, I will take charge of my last match at the Rosaleda, Everyone has the right to follow their own path.
"I would like to thank the owners of the club for putting their trust in me."
The Chilean, who has previously managed Villarreal and Real Madrid, led Malaga to the Champions League quarter-finals in 2012-13. They were knocked out by finalists Borussia Dortmund.
It was Malaga's inaugural Champions League campaign, having qualified by finishing fourth in Pellegrini's first full season in charge.
"Malaga has a story without Manuel Pellegrini, and is also going to have a future without Manuel Pellegrini," he said.
"My coaching staff and I have separated from Malaga but our union with this city will be eternal."
Mancini's assistant Brian Kidd is currently managing the team on their tour to America.
Pellegrini, a former Chile international, also guided Villarreal into Europe's top competition for the first time in their history during his time as their manager between 2004 and 2009.
The club reached the semi-finals in 2006 before being beaten by Arsenal.
Pellegrini took over at Real Madrid in June 2009 but only lasted a season at the Bernabeu.
Real won 31 of their 38 league games in 2009-10 but finished runners-up behind Barcelona, while they were knocked out of the Champions League at the last-16 stage by French side Lyon.