Mercedes has confirmed Lewis Hamilton has signed a three-year deal to drive for the German squad from next year.
The Briton, whose move was expected after McLaren announced Sergio Perez for 2013 earlier on Friday morning, will drive alongside Nico Rosberg, replacing seven-time champion Michael Schumacher at the team.
Mercedes did not specify what Schumacher's plans were.
Hamilton, who has been driving for McLaren since he made his debut in Formula 1 in 2007, said he needed a "fresh challenge".
"It is now time for me to take on a fresh challenge and I am very excited to begin a new chapter racing for the Mercedes Formula 1 team," said Hamilton.
"Mercedes-Benz has such an incredible heritage in motorsport, along with a passion for winning which I share.
"Together, we can grow and rise to this new challenge. I believe that I can help steer the Silver Arrows to the top and achieve our joint ambitions of winning the world championships."
Hamilton's career has been supported by Mercedes and McLaren for many years, having driven with Mercedes-Benz engines in the Formula 3 Euro Series and during his whole F1 career at the Woking team.
"I am delighted to welcome Lewis Hamilton to our team," said Mercedes boss Ross Brawn. "The arrival of a driver of Lewis' calibre is a testament to the standing of Mercedes-Benz in Formula 1 and I am proud that Lewis shares our vision and ambition for the success of the Silver Arrows.
"I believe that the combination of Lewis and Nico will be the most dynamic and exciting pairing on the grid next year, and I am looking forward to what we can achieve together."
Rosberg and Hamilton were team-mates in 2000 at TeamMBM.com in Formula A karting.
After the news was announced, Rosberg tweeted: "Very cool that Lewis will be my new team-mate! Going to be another great challenge."
By AUTOSPORT F1 editor Edd Straw
With the signing of Lewis Hamilton, Mercedes now has everything... except excuses. In almost three full seasons since the marque returned to F1 as a works team having acquired the Brawn squad, it has produced one victory among a lot of underachievement.
In an interview with AUTOSPORT just before the launch of its 2012 car, team principal Ross Brawn stated that "third has got to be the minimum. Anything less would be a failure." So by its own terms of reference, Mercedes has failed this year.
Realistically, Hamilton has to write off winning the title next year, but if the potential of the Brackley team can be fully realised and Mercedes produces the kind of V6 turbocharged engine straight out of the box that it's capable of, Hamilton could be perfectly placed for 2014.
But Hamilton has still rolled the dice on a perennially underachieving team delivering. Like all good gambles, if it pays off, he wins big. 'If' being the operative word.