Valtteri Bottas will stay at Mercedes for the 2019 Formula 1 season, with an option to remain for 2020 too.
The news comes just a day after Lewis Hamilton's two-year contract extension was announced.
"I'm really pleased. I love working with this team, I love the team spirit, the atmosphere in the team and everyone is pushing so hard for the results," said Bottas in a video released by Mercedes ahead of German Grand Prix practice.
"I will keep doing all my best to achieve those results, I will give 100% as always."
Mercedes team principal Toto Wolff had made no secret of the fact that he had to keep an eye on the driver market and explore other options, with Daniel Ricciardo the most obvious potential candidate.
"Valtteri's performances have been excellent this season and, if not for our mistakes and his misfortune, he could be leading the drivers' championship at the moment," said Wolff.
"When we took the decision in favour of Valtteri for 2019, it wasn't just about his undoubted speed and work ethic, but also a question of character.
"His relationship with the team, including Lewis, is open and trusting, without any politics at all.
"Those are the ingredients you need when you're fighting strong rivals in both championships and they mirror the values inside the team."
In the end Mercedes decided that Bottas had earned his place with his consistently strong form, despite bad luck having cost him many points this year.
On Thursday at Hockenheim, Bottas revealed that negotiations with Mercedes had only recently become serious, and that he had not been concerned about looking elsewhere.
"The thing is, there's no rush," he said. "For me there's been no panicking to try and go anywhere, because once you're down four or five races of the year, it still feels like quite early in the season, but suddenly the time goes very quick, and you realise it's halfway, and it's better to get things sorted. That's normally when the discussions start.
"All that matters is the team knows exactly how I perform, what I can do in the car, what kind of results I can do, and that I can battle with Lewis.
"That's all the matters to the team, the pure performance, and also what matters to me."