There had been much speculation over the seven-time world champion's future with his previous deal having been set to expire at the end of the current season.
But Hamilton's new deal will now take him well past his 40th birthday as he looks to claim a record eighth world championship, with current team-mate Russell also committing his immediate future to the team.
Hamilton: We have never been hungrier to win
Hamilton, who has won six World Drivers’ Championships and eight World Constructors’ Championships with the team – recording 82 race victories and 78 pole positions – on the way will extend his tenure with Mercedes into a 12th, and then 13th year.
Hamilton said: “We dream everyday of being the best and we have dedicated the past decade together to achieving that goal. Being at the top does not happen overnight or over a short period of time, it takes commitment, hard work and dedication and it’s been an honour to earn our way into the history books with this incredible team.
"We have never been hungrier to win. We have learnt from every success but also every setback. We continue to chase our dreams, we continue to fight no matter the challenge and we will win again. I’m grateful to the team who have supported me both on and off the track. Our story isn’t finished, we are determined to achieve more together and we won’t stop until we do."
The Norfolk-born racer has also extended his deal by a further two years.
“I have grown up with this team ever since joining as part of the Junior programme back in 2017,” said Russell. “It’s my home and it feels fantastic to extend our special relationship through 2025.
“After stepping up to the Mercedes race seat last year, I wanted to reward the trust and belief that Toto and the rest of the team placed in me. Taking my first pole position and race win last year was an unforgettable feeling.
“We have made some significant steps over the last 18 months and are only getting stronger as a team. I’m excited to help continue to build on that momentum as we progress into 2024 and 2025 as we continue to focus on returning to the very front of the pack.”
There had been much speculation about the future of Hamilton in particular, but both Mercedes and the Englishman had claimed it was just a matter of time before they confirmed the new contract.
Today's announcement appears to prove that was indeed the case and all rumours to the contrary were unfounded.
“Those leadership qualities are crucial as we focus on fighting for world championships again. As F1’s biggest global star, he has also played a key role in shaping our commitments to diversity, inclusion and sustainability, that will be foundations for our success in the years ahead.”
Wolff is also delighted to have locked down Russell, considered to be one of the best young drivers in the world, for another two years as well.
“His maiden pole position in Hungary and first Grand Prix victory in São Paulo were standout moments last season. As a driver, he combines razor-sharp speed with the tenacity of a true fighter. But he brings, too, an intelligence and attention to detail that will help him to continue to grow, develop and improve further.
“He is a natural fit to the team and we are delighted to have extended the relationship for the coming years.”