Lewis Hamilton wrapped up his fourth world championship title at this weekend’s Mexican Grand Prix.

The Mercedes driver has clinched the title with two races still to go in the calendar as his closest rival, Ferarri’s Sebastian Vettel, lagged behind in the race after a competitive first half of the season.

But how did a season that promised so much and treated fans to such a titanic tussle between two of the best drivers on the grid driving for two iconic teams turn into such a one-sided contest? How is a battle that seemed set to go down to the wire decided two races from the end?

Here, we look back at some of the highlights of the year and the decisive twists that swung the title race Hamilton’s way.

Australian Grand Prix

The season-opening Australian Grand Prix marked a step into a brave new world for Formula One. New rules, new cars, new owners all promised to take the sport into a whole new era. But would the track action be a case of more of the same, or would it also throw up a new winner, a change of guard after three years of crushing Mercedes superiority?

The answer? A resounding yes.

The change in rules hadn’t knocked Mercedes off their stride, but they had helped Ferrari find theirs. The reigning champions were still out of reach in qualifying, with Hamilton seizing a comfortable pole position. But Ferrari had the better race car. Kinder on its tyres it allowed Vettel to overhaul his rival on Sunday and open the season with a comfortable win.

He beat Hamilton’s Mercedes on merit to take his and Ferrari’s first win since the Singapore Grand Prix in 2015 and seize the overall championship lead.

It was the first time since the end of 2013 that a non-Mercedes driver had led the standings, when Vettel ended the year as world champion. It was also the first time a Ferrari driver was at the top of the tables since October 2012, when Fernando Alonso had held the overall lead.

The battle was very much on!

Spanish Grand Prix

As Formula One headed to Spain, the fifth race of the year, to kick off its European leg after the opening series of flyaway rounds, there were still only 13 points between Vettel and Hamilton. The German, with two wins from the opening four races, remained in the overall lead. But the tussle between the two contenders had been a tit-for-tat contest, with the exception of the race in Russia won by Nico Rosberg’s Mercedes replacement Valtteri Bottas. Vettel would strike and Hamilton would strike back. Both had an answer for the other. Both were evenly matched.

In Spain there would be absolutely nothing to choose between them.

Hamilton and Vettel had together claimed seven of the last nine world championships combined. Locked as they appeared to be in a full-blown title battle for the first time in their Formula One careers, they still hadn’t engaged in an all-out, head-to-head tussle for the win.

That finally changed in Spain. Vettel beat pole-sitter Hamilton off the line to seize an early lead. But by no means could he settle into it with the Briton in hot pursuit. The pace they set at the front was relentless. Both were in a league of their own. Vettel pushed, Hamilton pushed harder still. Just how much they were giving it was evident from the team radio transmissions, with Hamilton clearly out of breath.

Neither ceded an edge, neither displayed any weakness. It was a contest of equals. This race would not be decided on the basis of pure ability alone or a difference in car performance, because there was none.

In the end, strategy would make the difference. A well-timed pit-stop under a virtual safety car swung the race in the Hamilton’s favour and the Briton duly won. He was now just six points behind Vettel.

Monaco Grand Prix

Ferrari and Sebastian Vettel struck what remains their most decisive blow of the season against Hamilton and Mercedes in Monaco. After the hard-fought contest in Spain, Ferrari were clearly the team to beat in the Principality.

Mercedes’ car, which team boss Toto Wolff called a “diva,” just wasn’t working around the tight twists of the street track.

Kimi Raikkonen led a front-row lockout in qualifying ahead of Vettel, the Finn seizing his first pole position since the 2008 French Grand Prix and also Ferrari’s first in Monaco since 2008.

Bottas was third for a struggling Mercedes, while Hamilton, who set the 14th-fastest time, failed to even make it through to the final top-ten shootout.

Vettel duly cruised to victory on Sunday, leading Raikkonen home in Ferrari’s first one-two finish since 2010 amid murmurs of team-orders, dealing Mercedes their most resounding defeat in terms of outright performance since the German squad became F1’s pacesetters at the start of 2014.

Bottas finished fourth, Hamilton seventh. It was only the second time since the start of 2014 that both Mercedes drivers had finished off the podium and Vettel’s win allowed him to stretch his gap over Hamilton in the standings to 25 points, worth a whole race win.

Graphic by Anand Katakam

Azerbaijan Grand Prix

The rivalry between Hamilton and Vettel, so far full of respect, came to a head in Baku. Circulating behind the safety car, second-placed Vettel was caught out by race leader Hamilton slowing the pack down in preparation for the restart. Believing Hamilton had brake-tested him, he pulled up alongside the Briton and swerved his Ferrari into his rival’s Mercedes.

Vettel was given a ten-second stop-and-go penalty for his offence, but he still came away with a bigger championship lead over Hamilton after the triple champion was forced to make an extra-pit stop when his cockpit headrest worked loose. Neither driver finished on the podium, Vettel fourth with Hamilton fifth. But that allowed Vettel, who had gone into the race with a 12-point lead, to leave Baku with a 14-point cushion.

British Grand Prix

Hamilton went into his home race at Silverstone desperately needing to win. He had finished fourth to Vettel’s second at the previous race in Austria after a penalty for an unscheduled gearbox change dropped him to eighth on the grid. His deficit to the German had swelled to 20 points. Cheered on by his home fans, he had to deliver a big blow to swing the momentum in the title battle in his favour. And he did just that, taking a dominant win ahead of team-mate Valtteri Bottas in a Mercedes one-two. Luck, which until then appeared to be going against him, also turned in his favour. Two laps from the end, Vettel’s Ferrari suffered a puncture forcing him into the pits. The German had been set for a fourth-place finish on an already difficult afternoon but the puncture and extra stop cost him dear and dropped him to seventh at the flag.

In a remarkable reversal, Hamilton’s win combined with Vettel’s misfortune, meant the Mercedes driver left his home race just one point behind the four-time champion.

Italian Grand Prix

Hamilton said his Silverstone win had lit a “forest fire” inside him and it showed when the 32-year-old became the 2017 season’s first back-to-back winner and seized the overall championship lead for the first time in Italy.

Hamilton’s win in Italy, Ferrari’s home soil, was as dominant as they come. Vettel, meanwhile, could do no better than third. At one point even that looked under threat from Red Bull’s Daniel Ricciardo, who had started 16th.

It just wasn’t Vettel’s day.

He went into Formula One’s annual summer break with a 14-point cushion over Hamilton after leading Raikkonen in a Ferrari one-two in Hungary.

But Hamilton’s triumphant start to the second half of the season in Belgium, a week before the Italian race, and now a second straight win at Monza, allowed him to take a slim three-point lead in the overall standings.

Singapore Grand Prix

Sebastian Vettel race ended within seconds of the start after he was involved in a crash Credit: MANAN VATSYAYANA/AFP

This is where it all began to unravel for Vettel. The race in Belgium, where Vettel finished second but ran race-winner Hamilton close, dispelled doubts about Ferrari’s ability to match Mercedes at all types of track. But Singapore, nonetheless, presented Ferrari with a golden opportunity to score big points against Mercedes.

The Marina Bay circuit has always been somewhat of a bogey track for Mercedes. It proved to be the case again this year. The German outfit were only the third quickest team, with even Red Bull faster than them around the floodlit street track’s tight twists.

Qualifying was a Ferrari-Red Bull battle for pole with Mercedes never really in contention. Vettel pulled out an inspired lap to seize top spot even as Hamilton could only manage fifth. But that would be as good as it got for the German.

Vettel’s race ended seconds after the start. Having made a slightly tardy getaway, he moved across the track to cover off fellow front-row starter Max Verstappen. Unsighted, Raikkonen had pulled up along the other side of Verstappen’s car. Pincered by the the two Ferraris, the Red Bull made contact with Raikkonen’s Ferrari, sending it spearing across the track and into Vettel’s side.

Race over.

The opening lap carnage allowed Hamilton to move into the lead from fifth. He went on to win and take home the maximum 25 points, even as Vettel came away empty-handed. As a result, instead of taking back the title lead, Vettel left Singapore 28 points behind Hamilton.

Malaysian Grand Prix

Another race where Ferrari held a clear speed advantage over Mercedes and another weekend of heartbreak. This time it was an engine problem in qualifying that prevented Vettel from setting a time putting him dead last on the grid for Sunday’s race.

Raikkonen at least managed to get himself onto the front row alongside pole-sitter Hamilton. But he didn’t even make the start after another engine problem struck his car on his lap to the grid.

Vettel put in a stirring comeback drive to finish fourth but Hamilton, his Mercedes no match for Max Verstappen’s race-winning Red Bull, still came away with second. The gap between the pair now stood at an even wider 34 points.

Japanese Grand Prix

Vettel’s hopes of clinching a maiden title with Ferrari, already tenuous after the double-whammy blows of Singapore and Malaysia, were forced onto life support in Japan.

Incredibly, for the third straight weekend, Vettel’s challenge was hit with misfortune. The German had qualified second. With the track temperatures hotting up on race day, conditions the Ferrari likes, Vettel should have had every chance of overhauling pole-sitter Hamilton.

But just minutes before the start, it became apparent that his Ferrari had developed a problem.

Mechanics swarmed the car, already on the grid, their hands thrust deep into its innards. They got the car ready to go in time for the start but the problem, a faulty spark plug, hadn’t been fixed. Four laps into the race, Vettel — plummeting down the order with a lack of power — got the radio message he had been dreading - “We retire the car.”

Hamilton? He went on to win and stretch his lead to a whopping 59 points.

From then on, it became a matter of when not if for Hamilton. And that when came on Sunday where despite finishing in ninth place, he clinched the much-awaited fourth world title.