The Russian Grand Prix gets under way at 13:10 BST on Sunday

If Ferrari's Sebastian Vettel is not quite in the last-chance saloon at this weekend's Russian Grand Prix, he is on the edge of town riding a prancing horse that has developed a limp.

Forty points behind championship leader Lewis Hamilton, Vettel has been beaten in three of the last four races, all of which he could - perhaps should - have won had he and his team put together a perfect weekend.

Instead, the story of Ferrari's 2018 season has been one of not achieving perfection anywhere near often enough.

The result is Hamilton has an increasingly insurmountable-looking advantage in the title race, despite his Mercedes being - for most of the season - only the second fastest car on the grid.

If Vettel does fail to overhaul Hamilton in the remaining six races, it will be 10 years since Ferrari won a world championship title, and the fourth time in that period that a golden opportunity slipped away.

First, a slow decline

The look of dominance: Michael Schumacher won the drivers' championship five times with Ferrari between 2000 and 2004

It is all so different from the first years of this century, which began with Ferrari in utterly dominant form, as the most ruthlessly successful F1 team ever constructed helped Michael Schumacher deliver five consecutive world titles.

Kimi Raikkonen, Ferrari's intended replacement as the team's lead driver, benefited from the momentum of that success. Ross Brawn and Rory Byrne, the architects of Ferrari's engineering excellence, left at the end of 2006, but the 2007 car was effectively designed on their watch.

In it, the Finn ultimately secured what remains Ferrari's last driver's title, by just one point from McLaren drivers Lewis Hamilton and Fernando Alonso, who tied on points.

Ferrari's car remained absolutely competitive into 2008, by which time Jean Todt had left his position as team boss and handed over to Stefano Domenicali.

This time, Felipe Massa led Ferrari's charge, and the Brazilian missed out only at the last corner of the final race, as Hamilton took the fifth position he needed to clinch the title in a chaotic dry-wet Brazilian Grand Prix.

But by 2009, the momentum of the Brawn-Byrne-Todt-Schumacher years was fading, and the car was uncompetitive, Raikkonen taking only a single victory before being paid to leave the team at the end of the year so he could be replaced by Alonso.

The Alonso near-misses

A look of bewilderment: Fernando Alonso had a number of near misses, but was never given the best car in the field

Much was expected of the combination of Alonso and the sport's most famous, best-resourced team, and the relationship started well. Alonso won on his Ferrari debut at the 2010 season opener in Bahrain, after Vettel's leading Red Bull hit engine problems.

The Ferrari was not as competitive as the Red Bull, and Alonso over-reached in the first half of the season, leading to a couple of high-profile mistakes.

By the British Grand Prix in mid-summer, he was 47 points off the lead, but still declared that he could win the title - and was true to his word as, even without the fastest car, he went on a remarkable run of form that saw him take the championship lead with two races to go.

Only for Ferrari to mess it up.

Alonso needed only to finish fourth in the final race of the season in Abu Dhabi to clinch the title no matter what the results of his rivals - Vettel, his Red Bull team-mate Mark Webber and Hamilton.

But Ferrari made a cataclysmic strategic error. Webber was closest to Alonso on points, and when the Australian made an early pit stop after a safety-car period, Ferrari covered him with Alonso - apparently forgetting that Vettel was leading and would win the title if Alonso did not recover to fourth.

Alonso's pit stop left him behind the Renault of Russian journeyman Vitaly Petrov, but the Renault's superior straight-line speed made it impossible to pass on a track where overtaking was all-but impossible in the days before the controversial DRS overtaking aid. Alonso finished an agonising seventh as Vettel sneaked the title from under his nose.

Two years later, Alonso was faced with an arguably even more frustrating situation.

Ferrari's car in 2012 was not competitive - it was only the fourth fastest on average qualifying pace - but Alonso drove the season of his life and was 40 points clear of Webber with 11 of the season's 21 races run, with Vettel a further two points adrift.

But then the hex on Alonso struck again.

At the Belgian Grand Prix, he was taken out at the first corner by Romain Grosjean's Lotus. Three races later, more bad luck. A light touch from the front wing of Kimi Raikkonen's Lotus as they jockeyed for position at the start punctured Alonso's left rear tyre. Another retirement.

The Spaniard was 13 points adrift going into the final race of the season, but when Vettel crashed with Williams' Bruno Senna at the start, Alonso looked like he might prevail after all.

But Vettel's car, while badly damaged, kept going and he drove back through the field to sixth, enough to hold off Alonso, who finished second, by three points.

Alonso's had enough - time for another German champ

The look of love: Four-time champion Vettel has emulating his hero Schumacher very in mind

Alonso's 2013 started well, with two wins in the first five races, but a change in tyre construction following a series of alarming Pirelli failures worked against Ferrari and for Red Bull, and Vettel romped to the title with 13 wins in 19 races.

That was the beginning of the end of Alonso's Ferrari tenure. He lost all faith in the team when its new hybrid engine was uncompetitive at the start of 2014, and the car was not much cop either. Alonso negotiated an exit; Vettel a move to replace him.

As Alonso left to start the ill-fated second relationship with McLaren that is now bringing down the curtain on his F1 career, Vettel saw a chance to earn legendary status by emulating his childhood hero Schumacher and bringing the title back to Maranello after a lengthy drought.

As with Alonso, the relationship started well, with a win in Vettel's second race for Ferrari and three in all in 2015. But tensions started to show in a winless 2016, in which the team did not make the progress towards the front expected of them.

That all changed in 2017. Sergio Marchionne, who had replaced Luca Di Montezemolo as Ferrari president in October 2014, had taken a personal interest in Ferrari's F1 under-performance, and instigated a major restructure of the team's internal operations during 2016.

It had a dramatic effect - from playing catch-up, partly because of an inherent design conservatism, Ferrari went radical and creative, and suddenly they had a car at least as fast as the Mercedes.

For much of 2017, Vettel led the way, only for a late-season run of form from Hamilton and Mercedes, combined with something of an implosion from Ferrari, to unseat him.

Vettel, generally driving beautifully in the first half of the season, had already hurt his chances with a red-mist moment in the Azerbaijan Grand Prix, losing what would have been a victory when he was penalised for deliberately driving into Hamilton because he believed - incorrectly - that the Englishman had slammed on his brakes at a safety-car restart.

As the second half of the season started, though, Hamilton and Mercedes stepped things up a gear and, at the same time, Ferrari imploded.

A start-line collision in Singapore, triggered partly by Vettel's over-aggressive defensive swerve across the track, took out both Ferraris and Max Verstappen's Red Bull, and handed victory to Hamilton. And in the two subsequent races in Malaysia and Japan engine problems effectively sealed Ferrari's fate, and Hamilton was champion again.

History repeats itself, only worse

Vettel's collides with Hamilton at the Italian GP - yeah, that's right, Ferrari's home race

Could Ferrari maintain the promising momentum of 2017 and convert it into an even stronger challenge this year? Initially, the answer was yes.

The new car was even more competitive than the old. Ferrari's design philosophy had been very different from Mercedes' in 2017, but for this year the Italian team took a step towards their rivals with a longer wheelbase - although still not as long as the Anglo-German car - while maintaining their high-downforce, high-rake external-link approach.

The result has been a car that has been the fastest thing on track at all but a handful of race weekends - perhaps only in Australia, Spain, France, Austria and Silverstone has the Mercedes had an advantage; at all other tracks the Ferrari has appeared to have an edge.

But mistakes - each small, but increasingly costly - from driver and team have added up:

Ferrari brought Vettel in too early for his stop in Baku and lost him the lead to Hamilton's team-mate Valtteri Bottas. Vettel then slightly misjudged an overtaking attempt on the Finn at a re-start and a win turned into a fourth place

Vettel crashed with Bottas at the start in France, trying to back out of an overtaking move

As Vettel finished a qualifying lap in Austria, Ferrari failed to warn him of the presence of Renault's Carlos Sainz. Vettel blocked the Spaniard and was given a grid penalty, otherwise he probably would have won the race, which instead fell to Red Bull's Max Verstappen

Ferrari left Vettel trapped behind Raikkonen during the race in Germany despite the Finn being ahead only because of off-set strategy. It cost Vettel time, and increased the pressure on him during a late-race rain shower, in which he crashed out of the lead as Hamilton closed in rapidly

Ferrari chose to have Raikkonen, not Vettel, as the final man in a train of cars in qualifying in Monza. The Finn took pole, fought his team-mate on the first lap, and Vettel then crashed into Hamilton as the Mercedes driver overtook him at the second chicane, and spun to the back

Ferrari's car failed to generate sufficient tyre temperature in qualifying in Singapore, where pole and win had looked a foregone conclusion. Perhaps because of imperfectly managed track position on out laps, perhaps because of a failure to set the car up for cooling track conditions in qualifying, or both. Hamilton's blistering lap might have proved unbeatable, but Vettel should have been at least close.

Without these, Vettel would be something like 30-odd points ahead, and a strong title favourite, rather than 40 behind.

As it is, barring a remarkable turnaround - it looks set to be another lost season for F1's most famous team. And another 12 months before Ferrari get a chance to prove they really do have what it takes to win another world championship.