Jenson Button is to partner Fernando Alonso at McLaren next season.
The team are to announce their driver line-up at a news conference at their factory in Surrey on Thursday.
But BBC Sport has learned they have decided to retain Button after weeks of leaning towards Kevin Magnussen.
Button, the 34-year-old 2009 world champion, will continue into a 16th season and has his wish granted to test himself against the man widely regarded as the best in F1.
McLaren signed Alonso some weeks ago, but had been vacillating over the identity of his team-mate.
Chairman Ron Dennis had been keen to retain Magnussen, 22, but the continuing delays over making a decision have tipped the balance back in favour of Button.
The two were evenly matched for pure pace in 2014, with Button out-qualifying the novice 10-9 in 19 races.
The Englishman scored more than twice as many points as Dane Magnussen over the season.
McLaren had intended to retain Magnussen, who finished second on his F1 debut in this year’s season-opening Australian Grand Prix, on the basis that the team’s data had suggested he was fractionally quicker and had youth and promise on his side.
But Button’s strong finish to the season, his experience and perhaps unrest at boardroom level over Dennis’s position has influenced the team to go the other way.
Magnussen, who ended the season on 55 points compared to Button’s tally of 126, may be retained as reserve driver for 2015.
McLaren, as well as representatives of both Button and Magnussen, were unavailable for comment on Wednesday.
The farrago over the identity of the team’s second driver has detracted from the impact of McLaren’s signing of double world champion Alonso.
This is quite a coup considering his standing in the sport and the fact McLaren have succeeded in luring him away from Ferrari.
Ferrari had their least successful season for 21 years in 2014 but still finished ahead of McLaren, largely thanks to the efforts of Alonso.