Felipe Massa can achieve a historic first when the Formula 1 season resumes in China in two weeks.

The 31-year-old Brazilian, whose career was very nearly ended by an horrific incident during the Hungarian Grand Prix in 2009, could become the first team-mate of Fernando Alonso to out-qualify the double world champion five times in a row.

Not even Lewis Hamilton managed that when he was Alonso's partner at McLaren.

Massa's revival is not news - he has been back to something like his best since last autumn - but it is remarkable nonetheless.

How has it happened and what might it mean for Ferrari and Alonso?

Let's recap…

As soon as Alonso joined Ferrari in 2010, Massa, who had been with the team since 2006, fell into a secondary role behind the Spaniard.

A force of nature and a natural leader, Alonso effectively took Ferrari over - by presence, word and deed. At the same time, Massa, who had finished runner-up in the championship in 2008, was perhaps more concerned with his own F1 future than what Alonso's presence might mean for him and the team.

Felipe Massa profile Age: 31

Current team: Ferrari

Previous team: Sauber

Best championship finish: 2nd (2008)

Wins: 11

Podiums: 35

Poles: 15

Fastest laps: 14

During qualifying for the Hungarian Grand Prix in July 2009, Massa's skull had been fractured when a suspension spring fell from Rubens Barrichello's Brawn and struck his helmet. The injury threatened the sight in Massa's left eye and immediately put his driving career in jeopardy.

After several worrying months, Massa eventually returned to action for the start of the 2010 season, but there were doubts whether he would be able to recapture his best form.

The evidence of the last three years suggests his ability to drive consistently fast was affected.

Had he been physiologically affected by the head injury he had sustained? Or had he simply been unable to cope with Alonso's dominance on and off the track?

In all likelihood, it was a combination of both.

Having Alonso as such a relentlessly consistent benchmark is tough for any driver to handle, but it seems Massa found that some of the actions that he used to regard as automatic prior to his accident were no longer so. His concentration was not what it was, while he was, in effect, forced to re-learn some of his driving skills. Only now is that process complete.

Throughout 2010 and 2011, there were times when Massa out-paced Alonso, at least in qualifying, but the Spaniard was by far the more convincing Ferrari performer.

Massa's nadir was the first half of 2012. Like Alonso, he found the Ferrari exceptionally difficult to drive. Unlike Alonso, he found himself initially unable to adapt.

When he did manage to get the car set up to his liking, a combination of bad luck and driving errors meant he was still not delivering the points Ferrari expected, to the extent that, by the summer break last year, the team had decided to ditch him at the end of the season.

Massa thought about quitting F1

But rather than spell the end of Massa's career with Ferrari, the news he was being dumped effectively saved it.

Why? Well, he stopped focusing on trying to beat Alonso and instead concentrated on his own driving, determined to enjoy what he thought were his last few races in F1.

His results began to improve and he started looking somewhere like his old self. It was as if a switch had been flicked - one that has remained on ever since.

Still, it is a surprise that he is now out-qualifying Alonso so consistently.

One factor could be this year's Pirelli tyres. They are allowing Massa to benefit from his aggressive style on corner entry rather than, as was the case early last year, be punished for it.

Nevertheless, it's worth pointing out that first two qualifying sessions of the season - in Australia and Malaysia - have been in mixed conditions, which could have impacted on Alonso's pace.

If the situation continues, it will be interesting to see how Alonso handles it. The double world champion has a reputation for not being able to cope when challenged by a team-mate, although that reputation is founded on his behaviour more than half a decade ago.

Has he changed and will he see the positives of a competitive Massa? Or will Ferrari have to deal with the driver issues currently plaguing Red Bull?

Alonso says it is the former.

"It's the best news for the team," he said in Malaysia. "We need to have competition between the two drivers. It is very useful to compare and to analyse to make ourselves better. We will push each other to our own limits."

Alonso certainly needs all the help he can get after falling 22 points behind Sebastian Vettel in the drivers' championship after just two races.

After finishing second to the Lotus of Kimi Raikkonen in Australia, Alonso crashed out at the start of lap two of the Malaysian Grand Prix.

He had damaged his front wing at the end of the first lap but had stayed out on the track in an attempt to avoid taking two pit stops so close together in the early stages of race.

With the circuit drying, the cars were expected to come in for 'slick' dry-weather tyres anyway within a few laps, so Ferrari gambled on the wing surviving long enough for Alonso to get the changes done in one go.

However, the tactic failed. Alonso's wing broke off within a few hundred metres of passing the pit entry, sending him into the gravel trap and out of the race.

A glance at the results, and the knowledge of how much time would have been lost with a wing change, suggests that even had he made two stops, Alonso would probably still have been able to rescue fifth place - which would mean the gap to Vettel would now be only 12 points rather than 22.

Alonso says that "over 19 races we will be compensated", but his fight against Vettel and Red Bull - and anyone else who may be in the contest - just got that bit harder than it needed to be.