Formula 1 driver Carlos Sainz will join McLaren for the 2019 season.

The Bahraini government-owned team said Thursday it signed a multi-year contract with Sainz, who will fill the seat of Fernando Alonso who announced Tuesday he will step down from F1 after the current season.

Sainz currently drives for Renault but was confirmed earlier this month to be leaving the team after the French squad signed current Red Bull Racing driver Daniel Ricciardo for the 2019 season. A replacement for Ricciardo at Red Bull is yet to be named though there are rumors current Toro Rosso driver Pierre Gasly may get the pick.

McLaren is also yet to confirm if current driver Stoffel Vandoorne will stay with the team in 2019. It said that a confirmation of its driver lineup for 2019 at a later date.

“I’m delighted to finally be able to confirm that I’ll be a McLaren driver from the 2019 season,” Sainz said in a statement. “It’s a great name in the sport with an incredible heritage, and the list of drivers that have raced for McLaren over the years are among the heroes of Formula 1.”

McLaren hasn't won a championship in 10 years and has struggled near the back of the field since making the switch to Honda power units in 2015. The team switched to a Renault power unit for 2018 and is currently ranked seventh out of the 10 teams competing.

Sainz, whose father is successful rally driver Carlos Sainz Snr., first raced in F1 in 2015, originally with Toro Rosso. He only made the switch to Renault this season.