Lewis Hamilton claimed his fifth win of the Formula 1 season in controversial fashion as a five-second time penalty denied Sebastian Vettel and Ferrari victory in Sunday's Canadian Grand Prix following a near-collision for the pair.

Vettel led the majority of the race at the Circuit Gilles Villeneuve, retaining his advantage over Hamilton for all 70 laps, but was hit with a time penalty for unsafely rejoining the track and almost pushing Hamilton into the wall after making a mistake.

The penalty meant that while Vettel crossed the line first, he was classified second behind Hamilton, who extended his lead in the drivers' championship to 29 points after Mercedes teammate Valtteri Bottas could only finish fourth.

Vettel managed to retain his advantage over Hamilton at the start before eking out a two-second lead through the first stint of the race, with Charles Leclerc struggling to keep the duo in sight in the early stages.

Both Valtteri Bottas and Max Verstappen failed to make up any positions early on after starting down in P6 and P9 respectively, with the Soft starters of Daniel Ricciardo, Pierre Gasly and Nico Hulkenberg running in the top six before their early stops.

Vettel was able to keep Hamilton at arm’s length before coming into the pits at the end of Lap 26, putting pressure on Mercedes to respond one lap later. Hamilton was told to stay out as he didn’t have enough of a gap to catch Vettel, only to be brought in on Lap 28, with the Briton emerging over four seconds back from his Ferrari rival.

But after switching to the Hard compound tyre, Hamilton was able to carve into Vettel’s lead at a considerable rate of knots. By the time Ferrari told Vettel to turn up his engine, Hamilton had already whittled the gap down to less than a second, taking advantage of DRS to edge ever close to the Ferrari. Further concerns were raised for Vettel when Ferrari instructed him to take action over some information on his dashboard, with Hamilton drawing near as they scythed through traffic entering the final third of the race.

The flashpoint of their fight came on Lap 48 when Vettel lost the rear-end of his car entering the Turn 4/5 chicane, causing him to run wide onto the grass. Vettel came back onto the track, running wide towards the wall as Hamilton attempted to make a pass in the gap. Hamilton was forced to back out of the move, and quickly vented his anger over Vettel’s “dangerous” move over team radio. The stewards confirmed they would investigate the incident.

Hamilton’s rhythm appeared to be broken by the near-miss as he dropped out of DRS range and lost touch with Vettel, sitting a couple of seconds back from the Ferrari – only for the stewards to then have their say.

A five-second time penalty was handed down to Vettel for unsafely rejoining the track, sparking fury from the German. “I had nowhere to go,” he complained, before being told to focus to try and create the five-second gap. “I am focused,” was the reply. “But they are stealing the race from us!”

Vettel kept pushing to try and pull clear of Hamilton, but the Mercedes driver dug deep to get back within DRS range heading into the final five laps of the race, meaning he crossed the line narrowly behind his rival.

As a result, Hamilton was classified as the winner, marking his fifth win of the year as he extended his lead in the F1 drivers’ championship to 29 points after teammate Valtteri Bottas could only finish fourth.

Bottas managed to pick up the bonus point for the fastest lap of the race, but failed to finish on the podium for the first time this year.

Verstappen recovered from his sluggish first stint to finish the race fifth for Red Bull ahead of the Renault duo of Daniel Ricciardo and Nico Hulkenberg, while Pierre Gasly ended up eighth after getting stuck behind Lance Stroll following an early pit stop.

A long first stint worked wonders for Stroll, who finished an impressive ninth at his home race after his late stop, making a pass on Carlos Sainz Jr. to take the position. Toro Rosso’s Daniil Kvyat followed Stroll’s lead to take the final point for P10, leaving Sainz outside of the points following his early stop.