Lewis Hamilton says his new Formula 1 contract with Mercedes was mainly factored by the motivation of having “unfinished business” with the team.

Hamilton’s new two-year deal at Mercedes was confirmed on Thursday and will see him remain at the German manufacturer until 2025 when he will be 40 years old.

The extension means Hamilton will continue his record-breaking partnership with Mercedes going to a 13th season, having joined from McLaren back in 2013.

Having watched Red Bull dethrone Mercedes and assert its own dominance in the current ground-effect era, Hamilton was clear that his main target is to help Mercedes get back to winning ways.

“You’re all stuck with me for a little bit longer,” Hamilton joked, as quoted by Motorsport.com. “I couldn’t be happier to be extending with this team. We’ve had such an incredible journey together. Mercedes have supported me since I was 13, a long trip and we still have unfinished business, so we are in this together.

“We’ve got a lot of work to do to get ourselves back to the front, but there’s no place I would rather be.”

Asked if he had had doubts over extending his stay at Mercedes, Hamilton said: “No. I definitely wanted to continue.

“I mean, I think in life there’s always up and downs, like last year was a difficult year. I’m pretty sure everyone was questioning whether they wanted to continue because it’s tough at the top and it’s such a tough sport.

“But that feeling quickly goes away and you put your mind and your energy into being the best you can be and dealing with the situations that you’re faced with.

“I’m really proud of what we achieved last year to get through it. We started on the wrong foot this year, to have some really great results; we’re second in the constructors’ championship. The plan is to keep that and then close the gap to the guy ahead.”

Mercedes has won just once in the last 35 races after failing to hit the ground running with the new generation of cars, leading to a major revamp in car design and bringing back James Allison as its technical director.

Now that the team’s plans to be a regular contender at the front of the grid are being set in motion, Hamilton said Mercedes’ clear strive to win again was a major influence in him re-signing for two more seasons.

“It’s what you see; it’s not necessarily what someone says, it’s the work that you’re doing. It’s the meetings we’ve been having with all the engineers,” he said.

“James Allison and the whole group back at the factory, the heads of all the departments coming together and talking and just really engaging better than ever before about where we are, the mistakes we’ve made, why we made those decisions, why we won’t make them again, and where we’re going.

“[It’s] having that confidence in each other that we are the best at what we do, and when we come together and given time, we will get to where we need to be.”