Four-time world champion has signed a new two-year deal ahead of this weekend's German Grand Prix
F1 world champion Lewis Hamilton staying with Mercedes until 2020
Lewis Hamilton's long-running contract saga is over after Mercedes-GP confirmed the British driver has finally agreed a new deal.
Although Mercedes did not reveal specifics of Hamilton's contract extension it is understood that the four-time world champion will earn up to £40 million (Dh147m) a year until the end of 2020.
The 33-year-old Englishman's new contract cements his status as Britain's biggest earning sportsperson as well as the best-paid driver in Formula One history.
Mercedes' announcement comes ahead of the team's home race in Germany with Hamilton trailing Sebastian Vettel in the championship by eight points.
Hamilton said: "This contract extension has basically been a formality since [team principal] Toto [Wolff] and I sat down during the winter, so it's good to put pen to paper, announce it and then get on with business as usual.
"I have been part of the Mercedes racing family for 20 years and I have never been happier inside a team than I am right now.
"We are on the same wavelength both on and off track - and I am looking forward to winning more in the future and shining even more light on the three-pointed star. I'm very confident that Mercedes is the right place to be over the coming years."
Hamilton will be nearing his 36th birthday at the conclusion of his latest contract, and he has made no secret of his desire to forge a career in fashion or music.
But the Englishman's immediate future remains in a sport that has helped transform him from modest beginnings in Stevenage, Hertfordshire, into a global multi-million-pound superstar.
Hamilton is chasing his fifth world crown this season to join Michael Schumacher and Juan Manuel Fangio as the only other driver to have won more than four titles.
German Grand Prix talking points: Can Vettel break Hockenheim duck?
He is second to Schumacher, in terms of grands prix wins, and holds the record for the most pole positions.
Wolff said: "We signed the final documents this week and didn't want to keep people waiting any longer.
"There is not much about Lewis as a Formula One driver that hasn't been said already - he is one of the all-time greats and his track record speaks for itself.
"But what I enjoy most about working with him is getting to know the man inside the racing helmet: his relentless drive for self-improvement, his emotional intelligence as a team member and his loyalty to those around him."
Hamilton's decision to stay with Mercedes is set to have a domino effect on the driver market for 2019.
It is likely that Hamilton will be partnered by Valtteri Bottas for a third year with Mercedes content that the Finn is doing enough to retain his seat.
Bottas is fifth in the standings, 59 points adrift of Hamilton, but his campaign has been blighted by bad luck.
Daniel Ricciardo, a two-time winner this season, is out of contract with Red Bull, but Mercedes do not appear to want to risk rocking their stable ship.
Vettel is due to stay at Ferrari for a further two years. The identity of his teammate next season, however, is uncertain with highly-rated rookie Charles Leclerc mooted to replace Kimi Raikkonen.