Four-times Formula One world champion Lewis Hamilton ended months of speculation about his future on Thursday by signing a new two-year deal keeping him at his Mercedes team until the end of 2020.

The 33-year-old Briton would have been out of contract at the end of this season and the negotiations have been a major talking point in the paddock.

No financial details were given but British media reports have suggested the new deal could be worth up to 40 million pounds ($52.01 million) a year.

Thursday's announcement is now likely to trigger other driver decisions, with Australian Daniel Ricciardo set to remain with Red Bull but waiting for confirmation of Hamilton's contract.

"This contract extension has basically been a formality since (team chief) 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," Hamilton said ahead of Sunday's German Grand Prix.

"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," he added.

"I'm very confident that Mercedes is the right place to be over the coming years."

While Hamilton had been expected to stay with the team that has won both the drivers' and constructors' titles for the past four years, there had still been some lingering doubts about his commitment to the sport.

Former team mate Nico Rosberg stunned the team in 2016 when he won the title and then announced his retirement only days later.

Hamilton, who won his first title with McLaren, enjoys a celebrity lifestyle with plenty of interests -- mainly in music and fashion -- outside of Formula One and there have been questions about how long he will race on for.

The Briton said on Thursday that he was still hungry for success on the racetrack.

"The competitive passion that burns bright inside me is shared by every single member of this group - always chasing the next improvement and digging even deeper to make sure we come out on top," he said.

"I can't wait to see what we can achieve together in the next two-and-a-half seasons."

The Briton is currently eight points adrift of Ferrari's Sebastian Vettel, also a four-times world champion, at the halfway point in the season.

Wolff recognised there had been plenty of speculation in recent months and was happy to put it to bed.

"It's good to put all of that to rest and get this thing announced," he said. "We signed the final documents this week and didn't want to keep people waiting any longer."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.