Ferrari driver Carlos Sainz is to join Williams next season on what the team calls a "multi-year" contract.
The 29-year-old Spaniard has lost his seat at Ferrari after the team decided to sign Lewis Hamilton, who arrives next year.
Sainz has picked Williams over other opportunities at Alpine and Sauber, which will become Audi's factory effort in 2026.
Sainz said: "I am fully confident that Williams is the right place for me to continue my F1 journey and I am extremely proud of joining such a historic and successful team, where many of my childhood heroes drove in the past and made their mark on our sport."
Sainz, whose hopes of joining another top team from Ferrari were stymied when Red Bull and Mercedes made clear they would be looking elsewhere, added: "The ultimate goal of bringing Williams back to where it belongs, at the front of the grid, is a challenge that I embrace with excitement and positivity.
"I am convinced that this team has all the right ingredients to make history again and starting on January 1 I will give my absolute best to drive Williams forward."
Sainz has won three grands prix since joining Ferrari in 2021, but the team have long been committed to his team-mate Charles Leclerc as their main hope for the future, and Sainz lost out when an opportunity to sign Hamilton arose over last winter.
Red Bull re-signed Sergio Perez until the end of 2026 two months ago, and although the Mexican is at risk of being dropped after a disappointing run of form, the team did not want to put Sainz alongside Max Verstappen.
Mercedes have set their sights on convincing Verstappen to join them from Red Bull, which if it happens is most likely to be for 2026.
And they are poised to promote their 17-year-old Italian talent Andrea Kimi Antonelli to replace Hamilton alongside George Russell next year.
Sainz was left with a choice of three teams who are currently either in the midfield, in the case of Williams and Alpine, or at the very back, in the case of Sauber.
And he has chosen Williams as the most likely to progress in the coming years, even over Audi, who had made him their main target to lead their team.
Team principal James Vowles, who joined from Mercedes at the start of last season charged with turning the team into front-runners, said: "Carlos joining Williams is a strong statement of intent from both parties.
"Carlos has demonstrated time and again that he is one of the most talented drivers on the grid, with race-winning pedigree, and this underlines the upwards trajectory we are on.
"Carlos brings not just experience and performance, but also a fierce drive to extract every millisecond out of the team and car; the fit is perfect."
Sainz will join British-born Thai Alex Albon, who is also on a multi-year contract.
"In Alex and Carlos we will have one of the most formidable driver line-ups on the grid and with huge experience to guide us into the new regulations in 2026," Vowles said.
"Their belief in this organisation’s mission demonstrates the magnitude of the work going on behind the scenes.
"People should be in no doubt about our ambition and momentum as we continue our journey back to competitiveness - we are here, we are serious and with [owner] Dorilton’s backing we are investing in what it takes to return to the front of the grid."
The decision likely means the end of the F1 career of American Logan Sargeant, who has been with Williams since 2023.
Sargeant, who has been comprehensively out-performed by Albon in their 18 months together, looks unlikely to earn another seat next season.