The following correction was printed in the Guardian's Corrections and clarifications column, Wednesday 18 November 2009

Referring to the headquarters of the Brawn motor racing team, the piece below sited this in Brackley, Oxfordshire, when Brackley is actually in Northamptonshire.

Jenson Button has agreed terms to join McLaren on a £6m-a-year deal and could sign his formal three-year contract to partner Lewis Hamilton in an all-British line-up within the next few days.

The Guardian understands that the world champion has turned his back on Brawn following protracted negotiations and will almost double his salary with the Woking-based team. The 29-year-old was given a guided tour of McLaren's factory last Friday and, although neither the team nor Button's management would confirm the deal tonight, sources close to McLaren hinted: "I think Jenson liked what he saw and they liked him too."

In switching to McLaren Button will be going against advice from Formula One grandees including Sir Stirling Moss, Sir Jackie Stewart, Niki Lauda and Martin Brundle, all of whom feel he might be biting off more than he can chew taking on Hamilton on his home turf in equal cars.

But for Button the prospect of going head-to-head with a close friend and the man regarded by many in the pit lane as possibly the fastest of all will just be part of the challenge of defending his title. It is unlikely either Hamilton, who earns about £12m a year at McLaren, or his father Anthony, who has managed the 2008 world champion since his days as a teenage kart racer, will have been consulted on this beyond the normal deployment of good manners. McLaren have always had the resources and philosophy required to field two fully competitive cars and have always sought the strongest possible driver line-ups they could engage.

The decision by the newly crowned world champion to leave the team built from the ashes of Honda by Ross Brawn came on the day it was officially announced that Mercedes-Benz had switched allegiances from McLaren and purchased a controlling interest in Brawn GP. They will field their cars under the Mercedes banner in 2010.

It had been widely thought that Button would remain with the team alongside Nico Rosberg, the preferred Mercedes nominee, for 2010 following Rubens Barrichello's move to Williams. But there are suggestions that Button was never at the top of the Mercedes wish list. In fact, on Sunday Norbert Haug, the Mercedes motor sport vice-president, hinted that the company was already in talks to sign Nick Heidfeld from BMW, raising the possibility of two Germans going head-to-head with two Englishmen for next year's championship. Nick Fry, Brawn's chief executive, played down those rumours tonight, saying: "I can confidently say that [speculation] is totally incorrect – Mercedes is an international company. Clearly a German driver would be nice for them but we don't need two German drivers, that's not the intent."

He added: "I hope Jenson is still with us next season. We've been together for a good few years now and we have succeeded in winning the world championship together and we want Jenson to be with us. But we have to recognise that Formula One is not divorced from the rest of the world. We have worked within a budget [and] if we spend in one area then we cannot spend in another area."

The purchase of Brawn was funded by Mercedes' parent company, Daimler AG, who will own 45.1% of the team's equity, while Ross Brawn and the other senior management will hold 24.9% and the Abu Dhabi-based Aarbar investments will hold 30%. The team will continue to be run from its headquarters at Brackley in Oxfordshire.

Under the new arrangements finalised today McLaren will have the facility of using Mercedes engines through to 2015 if they wish to. "This is a win-win situation, for both McLaren and Daimler," said Ron Dennis, chairman of the McLaren group and the man who originally forged the team's alliance with Mercedes back in 1995. "I've often stated that it's my belief that in order to survive and thrive in 21st-century Formula One a team must become much more than merely a team. In order to develop and sustain the revenue streams required to compete and win grands prix and world championships companies that run Formula One teams must broaden the scope of their commercial activities.

"Nonetheless, all of our partners will of course continue to play a crucial role in our Formula One programme. For that reason, and because the engines they produce are very competitive, we're delighted that Mercedes-Benz has committed to continue not only as an engine supplier but also as a partner of ours until 2015 – and perhaps thereafter."

McLaren will not be disadvantaged by no longer being perceived as Mercedes-Benz's standard bearer in the Formula One front line. They and Mercedes have gone their separate ways because of conflicting interests in the high-performance road car arena. But out on the circuits McLaren remains potentially a consistently formidable winning machine. Button knows this and that is why he will be driving one of their cars next season.