Lewis Hamilton announced a surprise decision Thursday that sent shockwaves through Formula One.

The seven-time F1 World Drivers’ Championship revealed he will be making the switch from Mercedes-AMG PETRONAS to Scuderia Ferrari at the end of the 2024 season. Hamilton won all seven of his championships with Mercedes but has failed to yield a championship since 2020. He came in third last season and sixth in 2022.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Lewis Hamilton gets ready

Lewis Hamilton of Mercedes ahead of Formula 1 Abu Dhabi Grand Prix at Yas Marina Circuit on Nov. 26, 2023, in United Arab Emirates. (Beata Zawrzel/NurPhoto via Getty Images)

"I have had an amazing 11 years with this team and I'm so proud of what we have achieved together. Mercedes has been part of my life since I was 13 years old," Hamilton said in a statement. "It's a place where I have grown up, so making the decision to leave was one of the hardest decisions I have ever had to make. 

"But the time is right for me to take this step and I'm excited to be taking on a new challenge. I will be forever grateful for the incredible support of my Mercedes family, especially Toto for his friendship and leadership and I want to finish on a high together. I am 100% committed to delivering the best performance I can this season and making my last year with the Silver Arrows, one to remember."

F1 CHAMP MAX VERSTAPPEN NOT HAPPY WITH LAS VEGAS GRAND PRIX EXCESS: 'I DON'T LIKE ALL THE THINGS AROUND IT'

Lewis Hamilton smiles

Lewis Hamilton attends a press conference during the FIA Prize Giving at Baku Convention Center on Dec. 8, 2023, in Azerbaijan. (Aziz Karimov - Formula 1/Formula 1 via Getty Images)

Ferrari said Hamilton agreed to a multi-year contract.

"Scuderia Ferrari is pleased to announce that Lewis Hamilton will be joining the team in 2025, on a multi-year contract," the team said.

As the official announcements came out, Carlos Sainz announced he will part ways with Ferrari after the 2024 season.

"We still have a long season ahead of us and, like always, I will give my absolute best for the Tea and for Tifosi all around the world. News about my future will be announced in due course."

Carlos Sainz Jr. before the Italy GP

Carlos Sainz during the Formula 1 Pirelli Gran Premio d'Italia 2023 on Sept. 3, 2023, in Monza, Italy. (Alessio Morgese/NurPhoto via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

The F1 season begins on March 2 for the Bahrain Grand Prix.

Follow Fox News Digital’s sports coverage on X and subscribe to the Fox News Sports Huddle newsletter.