Kimi Raikkonen will return to Ferrari to join Fernando Alonso from 2014, the team has confirmed.
Ferrari's official announcement of a two-year deal confirms a move that had seemed increasingly inevitable in recent days.
Raikkonen was in the running for the second Red Bull seat alongside Sebastian Vettel, but the champion squad chose its protege Daniel Ricciardo as Mark Webber's replacement instead.
It then seemed most likely that Raikkonen would remain at current squad Lotus for a third season.
But assurances from the team about its future investment and technical packages were crucial to that deal, and Lotus was not yet in a position to provide those.
With Felipe Massa announcing on Tuesday night that he would leave Ferrari at the end of this season after eight years, and Raikkonen's rival candidate Nico Hulkenberg informed on Wednesday morning that he would not be required, the 2007 world champion's return to the Scuderia was sealed.
Raikkonen previously drove for Ferrari from 2007-09.
He came from behind to deny McLaren duo Lewis Hamilton and Fernando Alonso the title in his first season in red, but had to play second fiddle to team-mate Massa's championship push in 2008.
After a disappointing 2009 campaign, Raikkonen left Ferrari and Formula 1 for a career in the World Rally Championship.
This proved unsuccessful, and having dabbled with NASCAR Truck racing and tested Peugeot's Le Mans car, he headed back to F1 with Lotus last year.
An immediate frontrunner back in single-seaters, Raikkonen has been among Vettel's main opposition since his return.
RAIKKONEN'S FERRARI STATS
2007 2008 2009
Wins 6 2 1
Poles 3 2 0
Champ pos 1st 3rd 6th
Points 110 75 48