Sao Paulo: Former Brazil coach Luiz Felipe Scolari signed a contract with Palmeiras on Thursday, returning home for the first time since his humiliation at the 2014 World Cup.

Scolari was contracted to 2020 for a third spell with the Sao Paulo-based giant.

On Wednesday, the club fired Scolari’s predecessor, Roger Machado, after losing at Fluminense 1-0 in the 15th round of the Brazilian championship.

Scolari was Brazil coach when they lost to Germany 7-1 in the 2014 World Cup semi-final. He was also in charge when the Selecao won their fifth title in 2002, also against the Germans.

After the 2014 exit, Scolari coached his boyhood team Gremio for the rest of the year and left for China promising not to return to Brazil any time soon.

Local media largely blamed the man known as “Big Phil” for the World Cup result, mainly for sticking with players who won the 2013 Confederations Cup instead of picking in-form players at the time.

The coach’s last job ended in 2017 at China’s Guangzhou Evergrande, where he won seven trophies.

Scolari has already coached Palmeiras in more than 400 games.

The coach’s biggest accolade at the club was winning the Copa Libertadores in 1999. He also lifted the same trophy in 1995 with Gremio.