McLaren have announced the signing of Daniel Ricciardo from the 2021 season as a replacement for Carlos Sainz, who will take Sebastian Vettel's place on the grid at Ferrari.
Ricciardo will leave Renault at the end of this campaign, yet to start because of coronavirus, and will race alongside Lando Norris after being signed to a "multi-year agreement" with McLaren.
That paved the way for Sainz to put pen to paper on a two-year contract with Ferrari, who described the Spaniard as "an ideal fit with our family".
Sainz will race alongside Charles Leclerc at the Scuderia after it was confirmed earlier this week that Vettel would leave the team, with the four-time world champion saying there was "no longer a common desire to stay together".
Sainz, who finished sixth in the drivers' championship last year and claimed his first podium when he came third in the penultimate race in Brazil, is widely expected to be the support driver for Leclerc.
Ferrari team principal Mattia Binotto said on the team's website: "I'm pleased to announce that Carlos will join Scuderia Ferrari as from the 2021 championship.
"With five seasons already behind him, Carlos has proved to be very talented and has shown that he has the technical ability and the right attributes to make him an ideal fit with our family.
"We've embarked on a new cycle with the aim of getting back to the top in Formula 1.
"It will be a long journey, not without its difficulties, especially given the current financial and regulatory situation, which is undergoing a sudden change and will require this challenge to be tackled in a different way to the recent past.
"We believe that a driver pairing with the talent and personality of Charles and Carlos, the youngest in the past fifty years of the Scuderia, will be the best possible combination to help us reach the goals we have set ourselves."
Sainz added: "I am very happy that I will be driving for Scuderia Ferrari in 2021 and I'm excited about my future with the team.
"I still have an important year ahead with McLaren Racing and I'm really looking forward to going racing again with them this season."
Both McLaren chief executive officer Zak Brown and team principal Andreas Seidl paid tribute to Sainz in what appears to be an amicable parting of ways as they welcomed the arrival of Ricciardo.
Ricciardo surprisingly left Red Bull, a team with whom he had won seven races in five seasons between 2004 and 2018, to sign a two-year contract with Renault.
However, the Australian's first season was fraught with difficulty and he failed to make a podium. It seems he has now decided McLaren, who will switch to Mercedes engines in 2021, are the better bet for his long-term prospects.
"Signing Daniel is another step forward in our long-term plan and will bring an exciting new dimension to the team, alongside Lando," Brown said.
"I'm hugely optimistic about what Daniel can do for McLaren. He is a thoroughbred race-winner, a committed tough competitor and a great character."
Seidl added: "Daniel is a proven race-winner and his experience, commitment and energy will be a valuable addition to McLaren and our mission to return to the front of the field.
"With Daniel and Lando as teammates, I believe we have two racers who will continue to excite our fans and help the team grow."
Ricciardo took to Twitter to express his gratitude to Renault before insisting his focus is on the current season, which could start in July in Austria behind closed doors.
Ricciardo wrote: "I am so grateful for my time with @RenaultF1Team and the way I was accepted into the team. But we aren't done and I can't wait to get back on the grid this year. My next chapter isn't here yet, so let's finish this one strong. Merci."
Norris paid tribute to his departing McLaren team-mate Sainz.
The British driver wrote on Twitter: "¡Adiós amigo! It's only been a year, but it's been a pleasure@Carlossainz55.
"We've had some good laughs and made a few memories. Give it your all mate and let's give this year the send off it deserves."