Sergio Pérez, the 22-year-old Mexican, has impressed for the Sauber team this season. Photograph: Mark Thompson/Getty Images

McLaren have confirmed they are signing Sergio Pérez on a multi-year deal from next season as a replacement for Lewis Hamilton, who is on his way to Mercedes.

McLaren have trumped an announcement from Mercedes regarding Hamilton's switch with their own statement regarding the 22-year-old Mexican, who will leave Sauber at the end of this year to drive alongside Jenson Button in the 2013 season.

The McLaren team principal, Martin Whitmarsh, said: "We've been monitoring his progress carefully for some months. It was a string of giant-killing performances, a trio of podiums and a brilliant fastest lap in this year's Monaco Grand Prix that showed us that Sergio lacks nothing in terms of speed and commitment.

"Uniting Sergio alongside Jenson will give us a very broad base of driver ability. While Sergio is still developing his palette of skills, we're convinced that he's not only talented and quick, but also that he's willing and eager to learn.

"He's perfectly poised to develop into a world championship challenger. His addition to the Vodafone McLaren Mercedes team provides us with the perfect two-pronged driver line-up for the new season."

Pérez added: "I'm thrilled and delighted to have become a Vodafone McLaren Mercedes driver. The McLaren name is one of the greatest in the history of Formula One. For more than 40 years, McLaren has been a team that every racing driver has aspired to drive for – I was brought up on the great stories of Ayrton Senna's many world championship triumphs for McLaren – and I'm truly honoured that they've chosen me to partner Jenson from 2013 onwards."

Hamilton has decided to end his 14-year association with McLaren at the end of the season and join Mercedes on a three-year deal worth a reported £15m a year.

Hamilton said: "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 One Team. 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."

Whitmarsh paid tribute to the 27-year-old, who won the 2008 drivers' title with the Woking-based team. "It's entirely appropriate I should take this opportunity to pass on our thanks to Lewis," Whitmarsh said. "He wrote a huge chapter of his life and career with us, and was, and always will be, a fine member of an exclusive club – the McLaren world champions' club.

"It goes without saying we all wish him well for the future, just as it also goes without saying we hope and believe Sergio, too, will become a member of that exclusive club before too long."

Hamilton will partner his close friend Nico Rosberg at Mercedes, with the veteran former champion Michael Schumacher moving aside and possibly staying on as a brand ambassador for the team.

Schumacher said: "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. 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."