Felipe Massa has signed a one-year contract extension with Ferrari for the 2013 Formula One season.

Following a recent resurgence in form it means the 31-year-old is to remain with the Maranello marque for an eighth consecutive year.

A short statement from Ferrari read: "Scuderia Ferrari announces it has renewed its contract with the driver Felipe Massa to the end of the 2013 race season. The Scuderia's driver line-up for next year is therefore made up of Fernando Alonso and the aforementioned Felipe Massa."

At one stage earlier this year it appeared as if Massa was on his way out of the team, collecting a miserable 11 points from the opening eight grands prix.

It was a point emphasised on Monday by president Luca di Montezemolo, who claimed given Massa's form at the time he had little chance of being retained.

At that stage, at the end of June, Ferrari were known to be on the look-out for a replacement, holding talks with Mark Webber before the Australian opted to re-sign with Red Bull.

However, since the British Grand Prix, Massa has only finished out of the points once in the subsequent eight races to claw his way up to ninth in the drivers' championship.

The Brazilian's surge has also helped Ferrari overhaul McLaren into second place in the constructors' championship as the duo attempt to hunt down Red Bull over the remaining four grands prix.

Di Montezemolo said: "You can see from the constructors' championship he has returned to the levels we used to know well. I expect a lot from him and his capacity to take points from our rivals."

In confirming their 2013 line-up, it means Ferrari join Red Bull, McLaren and Mercedes, with Lotus certain to retain Kimi Raikkonen and Romain Grosjean, leaving few seats available beyond that.