Nico Rosberg is to remain at Mercedes for the next two years, after finally signing his new contract with the team.
The German had been in discussions with the team for several months about a new deal, with neither party considering other options.
But although the final details took some time to finalise, Mercedes announced on Twitter that the contract was finalised.
Mercedes revealed the new deal runs for two years which secures Rosberg's future with the German team until the end of 2018.
Rosberg had drafted in former grand prix winner Gerhard Berger to help lead the discussions with the team, because he did not want to get distracted from his efforts of trying to win the world championship.
The new Rosberg deal means that the three top teams – Mercedes, Red Bull and Ferrari – have all finalised their 2017 driver line-ups.
Ferrari is sticking with Sebastian Vettel and Kimi Raikkonen, while Red Bull will retain Daniel Ricciardo and Max Verstappen.
The length of Rosberg's deal lines up with Hamilton's own Mercedes contract that runs until the end of 2018.