Alonso, the 2005 and 2006 world champion, announced the new deal today.
“I am very happy to have reached this agreement,” Alonso said.
“I immediately felt comfortable within Ferrari and now it feels to me like a second family. I have the utmost faith in the men and women who work in Maranello and in those who lead them. It is therefore natural for me to decide to extend my relationship in the long term like this, with a team at which I will no doubt end my Formula One career one day.”
Ferrari president Luca di Montezemolo said there was no better man in the field to have in his team.
“It is a great pleasure to have renewed our agreement with a driver who has always demonstrated a winning mentality even in the most difficult circumstances,” he said.
“Fernando has all the required qualities, both technically and personally to play a leading role in the history of Ferrari and I hope he will be enriching it with further wins very soon.”
The next question for Ferrari is who will be his team-mate in the coming years. Felipe Massa still has one year remaining on his deal, although there have been strong rumours in recent months about Australian Mark Webber possibly defecting from Red Bull to Ferrari.