McLaren are to switch to Mercedes engines from the 2021 season, BBC Sport has learned.

McLaren, who have used Renault engines since last year, have secured a deal that will see them powered by Mercedes at least until the end of 2024.

The decision has been made as McLaren seek to return to competitiveness after a dip in fortunes in recent years.

It revives a partnership that previously ran from 2005 until the end of 2014.

After the previous partnership finished, McLaren made an ill-fated switch to Honda which lasted for three years.

McLaren, which will see out the final year of its Renault contract in 2020, has based its decision on two key factors – the Mercedes engine has been stronger than Renault’s since turbo-hybrid engines were introduced in 2014; and a customer supply with the German company is cheaper.

Mercedes have set the standard for engines in F1 in the hybrid era, and have been overtaken in performance only this year, by Ferrari.

McLaren and Mercedes have informed governing body the FIA of the move, but it has not yet been officially announced.

McLaren, Mercedes and Renault declined to comment.

Lewis Hamilton won the 2008 world title driving a McLaren-Mercedes

McLaren, whose drivers are Carlos Sainz and Lando Norris this season, split with Honda at the end of 2017 believing the Japanese engine was holding back their competitiveness.

They approached Mercedes at the time, but the German company refused to supply them, leaving McLaren with the choice only of Renault.

McLaren had a rude awakening in 2018 when, after dropping Honda, they realised their car was nowhere near as competitive as they expected it to be, and they ended the season sixth in the championship, and with the second-slowest car in the field in many races.

But after a major internal restructuring, McLaren have made a significant step forward this season and are fourth in the championship with six races remaining, behind only Mercedes, Ferrari and Red Bull.

The Renault engine has proved a small step forward in performance over Honda, which has also improved since 2017, but the French company continues to struggle with reliability.

McLaren’s move to Mercedes in 2021 will leave Renault with only one team using its engines – its own factory team.

Mercedes supplies its factory team as well as Racing Point and Williams – and now McLaren from 2021. Ferrari supplies Alfa Romeo and Haas in addition to its own works team.