The Brazilian Football Confederation (CBF) confirmed Wednesday former Sao Paulo boss Dorival Junior has been named coach of the Brazilian men's national team, taking over the five-time world champions after a string of poor results.

Dorival, whose appointment to the job was first announced Sunday by his former club, will be formally presented at CBF headquarters in Rio de Janeiro on Thursday, the confederation said in a statement.

The CBF did not specify the length of his contract. Brazilian media reports said it would run through the 2026 World Cup.

He replaces fellow Brazilian Fernando Diniz, who held the job on an interim basis from July 2023 until he was sacked last Friday.

Under Diniz, the "Selecao" had racked up three straight losses in World Cup qualifiers, including a humiliating 1-0 loss at home to arch-rivals Argentina in November.

Fans hope Dorival can restore the magic Brazil have largely failed to repeat since winning their last World Cup title in 2002.

The 61-year-old veteran coached Sao Paulo to the Copa do Brasil title last year, and previously led Flamengo to the 2022 Copa do Brasil and Copa Libertadores, the South American equivalent of Europe's Champions League.

He is set to make his debut in March, when Brazil play England and Spain in a pair of friendlies.

Dorival takes on the job at a difficult moment in Brazilian football.

The "Selecao" have struggled with a series of injuries, notably to star Neymar, who went off with a torn knee ligament in a 2-0 loss to Uruguay in October and is expected to be sidelined for months.

Brazil are currently sixth in South America's 2026 World Cup qualifiers, the last automatic qualifying spot from the continent.

The CBF has meanwhile been embroiled in a messy legal battle over its leadership that saw its president, Ednaldo Rodrigues, ousted from the job by a court ruling in December, only to be reinstated by a Supreme Court judge last week.

In the interim, Rodrigues's bid to hire Real Madrid boss Carlo Ancelotti to coach Brazil fell apart when the Italian renewed his contract with the Spanish giants.