Mercedes-Benz ended speculation that Formula 1 driver Lewis Hamilton might join another team next season or quit the sport altogether by announcing on Thursday it has extended the contract of the star driver for another two years.

It means Hamilton will now drive for Mercedes in the 2024 and 2025 seasons, and possibly beyond.

Mercedes also announced it has extended the contract of Hamilton's teammate, George Russell, for another two years. Russell has been with the team since 2022, after making his F1 debut with Williams in 2019.

Hamilton made his F1 debut in 2007 with McLaren and secured his first title with the team in 2008 before moving to Mercedes in 2013 and eventually winning six more titles to equal the record tally of seven titles shared with Michael Schumacher.

Hamilton looked set to secure an eighth title in 2021 but a controversial final race in Abu Dhabi saw the title go to Red Bull Racing's Max Verstappen. F1 then introduced new design regulations for 2022 and Mercedes has failed to build a competitive car since those regulations were introduced.

The lackluster performance led to speculation that Hamilton may join another team, namely Ferrari. There's also been talk of Hamilton leaving F1 to focus on new endeavors, like a potential fashion brand. However, his future in F1 is now set for the next two years.

“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 honor to earn our way into the history books with this incredible team,” Hamilton said in a statement. “Our story isn’t finished, we are determined to achieve more together and we won’t stop until we do."