MADRID -- Two-time Formula One champion Fernando Alonso will compete in the Dakar Rally in January.

His team, Toyota Gazoo Racing, made the announcement on Thursday after months of speculation that Alonso would compete in the grueling two-week race.

Alonso took a test drive in March in the Toyota Hilux truck that won the Dakar Rally this year.

The 2020 rally will be held in Saudi Arabia from Jan. 5-17.

The 38-year-old Spaniard was part of the winning 24 Hours of Le Mans team in 2018 and 2019. In January, Alonso became the third F1 champion to win the Rolex 24 at Daytona, joining Phil Hill in 1964 and Mario Andretti in 1972. He has also competed in the Indianapolis 500.

Alonso won F1 titles in 2005 and '06.