In doing so, he will become the first foreigner to coach Brazil in almost 60 years.

The Italian will be in charge of Brazil when they take part in the Copa America in the United States in June and July 2024, with Fluminense’s Brazilian manager Fernando Diniz filling in until then.

Ancelotti, 64, is one of the greatest football managers of all time, having lifted the Champions League four times, twice with AC Milan and twice with Madrid, and won national league titles in Italy, Spain, England, France and Germany.

Diniz, 49, has been appointed on a one-year contract, with the Confederation saying Diniz will combine his international duties with his role as Fluminense boss.

And Ednaldo Rodrigues, president of the CBF, said Ancelotti will replace Diniz once the Italian’s contract at Real Madrid expires in June 2024.

“He is a coach whose game-plan is really similar to that of the coach who will take over for the Copa America, Ancelotti,” Rodrigues said, according to reports in Brazil.

“He has almost the same type of methods.”

Diniz succeeds Tite at the helm following his resignation after Brazil’s disappointing showing at last year’s World Cup finals.

In a video statement, Rodrigues told the CBF’s website the national side is in good hands in the interim until Ancelotti takes over.

“I have followed Fernando Diniz’s career since the beginning and I believe that he is part of a new and promising generation of coaches that is growing up in Brazil.

“I admire his way of looking at football, which is similar to the style of the most important coaches in the world.”

Diniz, who worked with Newcastle midfielder Bruno Guimaraes during his time at Athletico Paranaense and Manchester United’s Antony at Sao Paolo, said: “I am very happy with the invitation and with the squad. I will certainly do my best for the CBF and for Brazilian football.

“It is a dream that I am fulfilling by being alongside great players.”

He will be in charge of this year’s six South American qualifying games for the 2026 World Cup, including the clashes with Argentina and Uruguay.

Brazil will start their qualifying campaign in September at home against Bolivia and then away against Peru.