Nico Rosberg has signed a new contract with Mercedes and will continue to partner triple world champion Lewis Hamilton for the next two years.
The German joined the team at the end of 2009 and has been runner-up in the championship for the past two seasons.
The 31-year-old's new deal means both he and Hamilton are under contract until the end of the 2018 season.
Rosberg leads the 2016 championship by one point from Hamilton going into Sunday's Hungarian Grand Prix.
The pair are dominating F1, having won nine of the opening 10 races, but their relationship is a fractious one, punctuated by a number of on-track clashes.
Rosberg said the new contract was a "special moment for me", adding: "I look forward to the future."
In a statement, Mercedes said: "Nico has been a core member of the Silver Arrows since the team returned to the sport in 2010 and has played a crucial role in the team's success in that time."
'You need to stay with your wife'
Mercedes team boss Toto Wolff told BBC Sport: "Contract negotiations are never a formality because it is important for the driver and the team. It took a couple of months and we signed it last night.
"I am in for long-term stability especially with the regulations change. I am a faithful person and if it functions well with your wife you need to stay with your wife."
Wolff also said he had no concerns about Rosberg and Hamilton's contracts expiring at the same time.
"It means they will try to outperform each other and you have to think to the younger generation," he said. "For me, there is more opportunity than risk in having both run out at the same time."
BBC Sport's chief F1 writer Andrew Benson:
Rosberg's new deal is no surprise given it has been telegraphed by both team and driver for some time.
He is also leading the world championship - and Mercedes could not afford to let a man who might win it leave at the end of the season.
The former Williams driver, who has 19 F1 wins in his career, has had a sometimes difficult relationship with Briton Hamilton, but it is a relationship Mercedes feel they can control.
The driver line-up is perfect for them. In Hamilton, they have arguably the fastest driver in F1. In Rosberg, they have a man who can win when Hamilton hits trouble and who is good enough to beat him on merit from time to time.
Retaining both drivers gives the team stability ahead of 2017, when a new set of regulations will dramatically change the cars. It's the obvious choice.
Seats filling up for 2017
Rosberg's deal means all three top teams have confirmed driver line-ups for 2017.
Red Bull are retaining Daniel Ricciardo and Max Verstappen, while Ferrari have confirmed Kimi Raikkonen as partner for Sebastian Vettel.
The only active world champion without a drive at this stage is Britain's Jenson Button, whose McLaren contract expires at the end of this season.
McLaren are likely to promote their Belgian reserve driver Stoffel Vandoorne to partner double world champion Fernando Alonso, although chairman Ron Dennis told BBC Sport two weeks ago they would not decide until September.
Button also has interest from Williams, who are likely to drop Brazilian veteran Felipe Massa. Finn Valtteri Bottas is under option and is likely to be retained.