LONDON - Lewis Hamilton will leave McLaren and race for the Mercedes Formula One team next season after agreeing a three-year deal in which the Briton replace seven-times world champion Michael Schumacher.

McLaren announced separately that Mexican Sergio Perez would partner 2009 champion Jenson Button in their line-up next season. The announcements by Mercedes and McLaren on Friday ended a long-running tussle for one of the sport’s hottest properties as well as an almost umbilical link between Hamilton and Mercedes-powered McLaren.

McLaren have backed the Briton since his early teens when he was making an impression in karting, after Hamilton had approached former McLaren principal Ron Dennis at a gala awards ceremony to tell him of his dream of driving one of his cars in Formula One.

The first black F1 world champion, whose humble background contrasts with the Monaco lifestyle he now enjoys as one of the highest-paid athletes in the world, has never driven for anyone else but said it was time for a fresh challenge.

“Mercedes-Benz has such an incredible heritage in motorsport, along with a passion for winning which I share,” said the 27-year-old Hamilton, the 2008 champion and winner of 20 grands prix including three so far this season. “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.”

British media reports suggested the deal was worth 60 million pounds ($97.15 million) with Hamilton in line for a basic annual salary of around 15 million. The move to Mercedes came after the German manufacturer signed a new agreement with the sport’s commercial rights holders, guaranteeing their long-term commitment. They were the last of the major teams to do so.

There was no word on Schumacher’s future plans, with the 43-year-old former Ferrari ace widely expected to retire for the second time after making a comeback in 2010. “I have had three nice years with the team which unfortunately did not go as well as we all would have wanted on the sporting side,” Schumacher, who could remain with Mercedes in an official capacity, said in a statement.

“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.”

Schumacher has been on the podium just once since his comeback, in Valencia this year, and has finished only half of the races this season. With Hamilton moving to Mercedes, the sport will have five world champions at different teams next season even without Schumacher.

Hamilton, who is fourth in the current championship and 52 points behind Ferrari’s Fernando Alonso with six races remaining, will partner Nico Rosberg next year. The two were also team mates as teenagers in karting.

Mercedes have won one race since they took over the Brawn GP team in 2009 but principal Ross Brawn said Hamilton’s arrival meant they could now match any team on the grid.

“The arrival of a driver of Lewis’s calibre is a testament to the standing of Mercedes-Benz in Formula One and I am proud that Lewis shares our vision and ambition for the success of the Silver Arrows,” he said. “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.”

Austrian Niki Lauda, a triple world champion who retired in 1985 and is close to Formula One supremo Bernie Ecclestone as well as commentating for German television, will join the Mercedes team as a non-executive chairman of the board. McLaren, who made sure their announcement was ahead of Mercedes’s, also made positive noises about the 22-year-old Perez.

Team principal Martin Whitmarsh, who said Hamilton had informed him personally of his decision in a telephone call from Asia earlier in the week, said the Mexican would have equal status to 2009 champion Jenson Button in the team. “We’re convinced that he’s not only talented and quick, but also that he’s willing and eager to learn,” he said. “He’s perfectly poised to develop into a world championship challenger.”

The sudden breakthrough in the driver market will now put Ferrari into focus, with Brazilian Felipe Massa out of contract and his fate yet to be decided, as well as opening up a vacancy at Sauber.