While no financial details were released by the team, the long-awaited deal is understood to be worth up to £40 million a year for the Briton, which includes performance-related bonuses, cementing his place as the best-paid British sportsman.
Talking to reporters during a team news conference ahead of this weekend's German Grand Prix, in which he seeks to beat local hero Sebastian Vettel of Ferrari and regain the leadership of this year's title race, Hamilton was full of praise for Mercedes and team chief Toto Wolff for their patience during seven months of prolonged negotiations.
This means that the focus in the driver market will switch to Red Bull and Ferrari, the next teams in the F1 pecking order.
"This contract extension has basically been a formality since Toto 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", Hamilton said.
Hamilton and Mercedes have managed to become the most dominant combo since Formula 1 switched to hybrid power in 2014. It is the stability that the team will want to fight for titles with in the next two years.
"We've just been working on trying to be better ourselves", he said. While I know there are drivers calling you - which I expect - I also trust that you're not thinking to do anything else, so we can take our time'.
"In terms of the other guys approaching, one did", he said.
The Scuderia Ferrari driver and current Championship leader ended fourth fastest in both the morning and afternoon sessions around the Hockenheimring circuit, ending 0.271 seconds off the pace setting time of Daniel Riccardo in FP1 before closing FP2 0.225 seconds off Max Verstappen. I am not investigating to see what other options there are.
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.
The world champion is set to start 14th, provided Mercedes do not uncover further damage to his auto which may trigger a demotion to the back row alongside Red Bull's Daniel Ricciardo. "[But] Seb's been real quick today so I think it's going to be a serious challenge". "I am also very conscious of how long it is beyond retirement".