London (CNN) -- Lewis Hamilton has signed a three-year contract to race for the Mercedes Formula 1 team beginning next season.
Friday's announcement by the team ends weeks of speculation about the Briton's future with McLaren -- a team he joined when he was 13 years old.
"Looking ahead to 2013, I am delighted to welcome Lewis Hamilton to our team," Mercedes team principal Ross Brawn said in a statement.
"The arrival of a driver of Lewis' caliber 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," Brawn added.
Hamilton, who won his only world championship title with McLaren in 2008 said he was looking forward to the challenge.
"I am very excited to begin a new chapter racing for the [Mercedes] team. Mercedes-Benz has such an incredible heritage in motorsport, along with a passion for winning which I share," Hamilton said in a statement.
Hamilton will partner Nico Rosberg in 2013 with Michael Schumacher making way.
Brawn thanked the seven-time world champion, who came out of retirement to join Mercedes in 2010, for his contribution during his three seasons at Mercedes.
"His energy and commitment have never wavered, even when results have not matched our own expectations, and we are determined to finish the 2012 season together on a high. As always, it has been a pleasure to work with Michael," Brawn said in a statement.
In a statement, Schumacher said he had enjoyed his three years at Mercedes even if they didn't do as successfully as he would have liked on the track.
"I wish Lewis well and for the team to achieve the success we worked so hard for in the build-up. I would like to thank the team for their trust and all the guys for their unconditional commitment. I will now concentrate on the next races," the 43-year-old said.
Hamilton's replacement at McLaren will be Sergio Perez.
The 22-year-old Mexican who currently races for the Sauber team will partner Jenson Button from 2013.
"I'm thrilled and delighted to have become a [McLaren] driver. The McLaren name is one of the greatest in the history of Formula 1," Perez said in a statement.
"For more than 40 years McLaren has been a team that every racing driver has aspired to drive for ... and I'm truly honoured that they've chosen me to partner Jenson from 2013 onwards," Perez added.
McLaren team principal Martin Whitmarsh praised Perez's "giant-killing performances" and "podium finishes" this season.
"He's perfectly poised to develop into a world championship challenger," Whitmarsh said in a statement.
Whitmarsh also passed on his thanks to the departing Hamilton, whose performances wrote "a huge chapter" in his and the team's life.
"It goes without saying that we all wish him well for the future ..." Whitmarsh said.
Meanwhile, the race schedule for 2013 has been released with doubts still surrounding the New Jersey event.
The Grand Prix is scheduled for June 16 but has yet to be finalized with concerns surrounding whether the track will be completed in time.
The season will start with the Australian Grand Prix on March 17 with the showpiece Monaco event taking place on May 26.
Silverstone will host the British Grand Prix on June 30 -- a week earlier than last year as not to clash with the Wimbledon men's final.