Hamilton held talks with Mercedes throughout the season to expand the deal with both sides, indicating that they wanted to continue a relationship dating back to 2013.
But they have finally cracked, with Hamilton to a two-year contract to extend his stay at Mercedes for eight seasons and a total of 14 years in Formula 1.
It will continue a hugely successful relationship that has produced four driver titles and four constructor championships to date, with Hamilton scoring 44 wins in five and a half seasons.
"This contract extension has been essentially a formality since Toto [Wolff]and I sat down in the winter, so it's good to put a pen on paper, announce it and continue as usual," Hamilton said.
"I've been part of the Mercedes racing family for 20 years and I've never been happier in a team than I am right now We're on the same wavelength both on and off track Although we've been so successful since 201
"The competitive passion that burns in me is shared by every single member of this group – always digging for the next improvement and digging deeper to make sure we get out of the top. I can not wait to see what we can do together over the next two and a half seasons.
Lawrence Barretto, [Senior writer, F1.com] says …  Hamilton is the third oldest driver in the F1 grid after Fernando Alonso and Kimi Raikkonen, but the four-time champion is still the hottest starting position.
It was clear that both Hamilton and Mercedes wanted to continue working together.While Hamilton would probably be driving at its peak and Mercedes would hit the sharp end in the next two years, that would be a formidable combination.
But the hell is As always in detail and both sides were keen to reach an agreement (19659002) Keeping a little longer for Mercedes – and again for Formula One – makes a lot of sense for Hamilton.
While Ferrari this season If he poses a greater danger, Hamilton will know his best bet to stay with Mercedes if he wants to challenge Michael Schumacher's record.
If he does wins the next three championships, Hamilton would equal with Schumacher at the height of seven. Such a feat is feasible. A record eighth would be within reach.
Last year, Hamilton won nine races. Repeat this year and in each of the next two years and he will be at 89, two short of Schumacher's all-time record, which seemed insurmountable at the time.
Reach this point and he would have to wonder if another deal with Mercedes was worth writing history?
But one step at a time. For the time being, the F1 will have one of its biggest drivers for another two years – and that's a win for everyone involved.