Jorge Sampaoli ended weeks of uncertainty over his future by resigning as coach of the Chile national team.

The decision ends weeks of tension over a dispute with the recently elected president of the Football Federation of Chile (ANFP).

Sampaoli, who led Chile to their first Copa América trophy last year, and came runner-up in World Soccer’s poll for the Coach of the Year, has been seeking to leave after details of his contract were disclosed to the press.

Chile Copa America 2015

Chile celebrate their 2015 Copa America success.

According to a statement on the ANFP website, Sampaoli paid a price to leave his position, forgoing bonus money he was due for the Copa América win. Thecompensation money will be offset against his next paid contract. Last month, he was linked with the Brazil club Flamengo, after a presidential candidate claimed he had received assurances from Samapoli that he would coach the club if his presidenctial bid was successful.

“With this step the board of the ANFP has achieved the goal of resolving the current situation affecting the national team, avoiding uncertainty involving potential lengthy court actions,” the statement said.

The ANFP president, Arturo Salah, who was elected after Sergio Jadue quit amid a corruption investigation in November, said the board was already looking for a replacement.

“Now we will dedicate ourselves to this priority, to do everything possible to qualify for the World Cup in Russia in 2018.”

Manchester City’s Chilean manager Manuel Pellegrini has reportedly ruled himself out of contention.

“I hope to remain with competitive teams in Europe. I am not thinking about returning to Chile at least for the next three or four years,” Pellegrini said in comments attributed to Radio Cooperativa.

“There is no chance I would coach over the next couple of years. Arturo has my full support for all that is needed. But being in charge of the national team is not something I would like to do at this time.”