The 23-year-old is under contract to Red Bull but driving for the works Renault squad on loan this year. Sainz’s future had been uncertain after Daniel Ricciardo switched from Red Bull to Renault.
He was under consideration to replace Ricciardo, but McLaren swooped to sign Sainz to a ‘multi-year deal’ after compatriot Alonso decided to leave F1.
“Carlos brings with him the perfect blend of youth and experience,” said McLaren boss Zak Brown. “Although he’s just 23, he’ll be starting his fifth season in the sport and will bring with him a huge amount of racing experience.”
Sainz, the son of double world rally champion Carlos Sainz Sr, made his F1 debut with Toro Rosso in 2015 and drove for the Italian squad until switching to Renault late last season.
Sainz’s McLaren deal clears the way for current Toro Rosso racer Pierre Gasly to be promoted to the main Red Bull team to partner Max Verstappen next year.
It's still unknown who will partner Sainz at McLaren in 2019. The team’s release didn’t mention current driver Stoffel Vandoorne, simply saying that it would “communicate its full driver line-up for the 2019 season in due course”.
Vandoorne is in his second season at the team but has generally trailed Alonso for pace. Drivers tipped to be in contention for the seat include 18-year-old Briton Lando Norris, who is McLaren’s reserve driver and a title contender in Formula 2 this season.