Ferrari driver Felipe Massa will move to Williams next season as team-mate to Finn Valtteri Bottas.
The 32-year-old Brazilian will replace Venezuelan Pastor Maldonado, Williams announced on Monday.
Massa said: “When I was a kid, I always dreamed of racing for Williams, Ferrari or McLaren and I’m glad to be signing with another icon of the sport.”
Maldonado is likely to move to Lotus to replace Kimi Raikkonen but also has options at Force India or Sauber.
Raikkonen was confirmed as Fernando Alonso’s new team-mate at Ferrari in September.
Williams have signed Massa, who leaves Ferrari after eight years in which he won 11 grands prix, on a three-year contract to add experience as they attempt to rebuild the team.
They are having what is set to be the least successful season in their history.
The Oxfordshire-based team, who dominated F1 for large portions of the 1980s and 90s, have so far scored only one point and lie ninth of 11 teams in the constructors’ championship with two races to go.
Massa hopes a restructure and recruitment programme under new technical director Pat Symonds – who has won championships with Michael Schumacher and Fernando Alonso at Benetton/Renault – will lead to improved fortunes next season, when new engine and chassis rules ensure all teams start again almost from scratch.
Massa, who lost out to Lewis Hamilton in the 2008 world title fight by just one point but helped Ferrari win the constructors’ title in 2007 and ’08, said he hoped his “experience will be useful in helping the team in its effort to move on from a difficult period”.
He said Williams were his “best option”, adding: “The team wants to grow. It is already a big team but they are really pushing hard to go back to what they were in the past.
“It is a team to fight for the championships and good results and I really want to be a part of it. I understand what they are doing to get stronger. I think we can be very successful and I believe it is the best choice compared to the other choices I had.”
Team founder and principal Sir Frank Williams described Massa as “an exceptional talent and a real fighter on the track”.
His daughter Claire, the deputy team principal, added: “Felipe has demonstrated his talent and speed over the years, as well as his ability to motivate and drive a team to championship success.”
She added that Bottas, the 24-year-old who is in his first season in F1, was “an exciting young talent”.
Claire Williams said the team’s driver announcement was “a key step towards our goal of returning Williams to the front of the grid and part of our ongoing plans to ensure we are stronger in 2014 and beyond”.
Maldonado leaves Williams following the breakdown of the relationship between driver and team.
The Venezuelan scored one victory in his three seasons with Williams – in Spain last year, the team’s first since 2004 – but had grown frustrated this season at the team’s poor form and wanted to leave.
Williams did not want to keep him, feeling his driving was too erratic and that his technical feedback was below par.
Maldonado was linked with the team’s sponsorship deal with Venezuelan state oil PDVSA, but Williams are said to have negotiated a settlement that will end that contract by mutual consent.
Bottas said: “I am happy to be staying with the team as I embark on my second season in Formula 1.
“I have faith in Williams and know we can do so much better in the future than our current performance shows.
“I am looking forward to having Felipe as my team-mate. He is a quick and experienced driver and together we will be pushing to the maximum to improve the car and get as many points as we can next season.”
Massa’s hopes for 2014
Felipe Massa believes Williams can benefit from a major change in Formula 1 rules to jump up the grid next season.
New engine and chassis regulations are being introduced in 2014 and the Brazilian told BBC Sport he sees his move from Ferrari as a “restart” for both him and his new team.
“This year, Williams are having a very difficult championship,” he said of 2013, which has been the worst season in Williams’s history. “But in 2014 everything is different and it is not impossible to be fighting for top four or five in the constructors’ championship. We need to believe and fight for that.”
Massa visited the Williams factory for the first time on Monday and said he was impressed with what he had seen.
“I’m so convinced [in Williams’s potential] because it is a big change next year. Everything changes – the car will be completely different – and I think Williams has all the capacity to do a good job.
“With all this change, the direction I can see [in the team] for next year is more important than anything.”