Esteban Ocon claimed one of the most unlikely victories in recent Formula One memory at the Hungarian Grand Prix – as Lewis Hamilton delivered a stunning comeback drive from last to third to take the lead of the championship.

Alpine’s Ocon held his nerve to cross the line 1.8 seconds clear of Sebastian Vettel as the French driver took advantage of a rain-hit start at the Hungaroring to take the first triumph of his career.

Following a chaotic opening, pole-sitter Hamilton was in last place, but the Mercedes driver fought his way past Ferrari’s Carlos Sainz with three laps to run to take the final spot on the podium and move six points clear of Max Verstappen, who finished 10th.

A rain shower 30 minutes before the race contributed to a crazy opening corner which saw Valtteri Bottas crash into McLaren’s Lando Norris, who in turn collided with Verstappen.

An out-of-control Bottas also wiped out Sergio Perez in the other Red Bull. Bottas, Norris and Perez were all forced to retire with the damage sustained, while Verstappen was left with a significantly wounded machine.

The race was stopped for 25 minutes to clear up the debris sprawled across the circuit.

But as the race restarted, and the track now virtually dry, Mercedes left Hamilton out on wet tyres, while all those behind peeled in for slick rubber. In bizarre scenes, it meant that Hamilton was the only one who started from his grid slot as the lights went out.

The Briton pitted the next time around, dropping him to last, with Ocon taking the lead of the race ahead of Vettel and Williams’ Nicholas Latifi.

Hamilton took aim at his team over the radio: “Come on, guys, get on it for the rest of the race.”

“We are on it, Lewis,” came the reply from his race engineer, Peter Bonnington. “Verstappen still has damage. You are going to be the fastest man out there easily. We can still win this.”

By lap 16, Hamilton moved past Mick Schumacher to take 11th and he then moved ahead of Verstappen, in his patched-up Red Bull, and McLaren’s Daniel Ricciardo, by virtue of stopping for the hard tyres one lap earlier.

Hamilton then moved past Schumacher again, and on lap 27 was in seventh after passing Latifi.

Lewis Hamilton. climbed from 14th on the grid to finish third
Lewis Hamilton. climbed from 14th on the grid to finish third (Tim Goode/PA)

Three laps later, Hamilton was sixth – following a mighty move around the outside of Pierre Gasly at the high-speed Turn 4 – and then fifth as he took Gasly’s Alpha Tauri team-mate Yuki Tsunoda.

“What is our target?” he yelled over the radio. “We are fighting for a podium,” Bonnigton said. “It is going to be hard but you can do it.”

Fernando Alonso pitted and Hamilton was up to fourth, but on ageing rubber he was running out of steam.

Mercedes rolled the dice to bring Hamilton in for his third stop of the afternoon.

With 22 of the 70 laps to run, Hamilton was 25 seconds behind Ocon but taking more than three seconds out of the Frenchman’s lead.

Suddenly a shock win appeared on the cards.

Hamilton asked the questions: “Where am I? How many cars have I got to overtake?” Bonnington replied: “Four cars for the win, Ocon is 25 seconds up the road.”

Mercedes boss Toto Wolff then made a rare appearance on the radio. “Lewis, you can win this,” yelled the Austrian.

Hamilton was suddenly just 10 seconds away from victory, but two-time world champion Alonso was not going to give up fourth without a fight.

The two champions went wheel-to-wheel on lap 55, and again two laps later, but the Spaniard, who was 40 on Friday, drove superbly to keep Hamilton at bay.

On lap 63, Alonso and Hamilton came within millimetres of touching on the uphill drag to Turn 4 but Alonso prevailed again.

“Guys, did you see he just moved on me, man?” Hamilton protested. “Come on.” He added: “At that speed, it was so dangerous, man.”

With five laps to run, Alonso afforded an opening to Hamilton at the first corner, and the seven-time world champion did not need a second invitation.

Then on lap 67, Hamilton raced past Sainz at the first corner to seal third, taking the chequered flag less than three seconds behind Ocon.

Hamilton, jeered again by Verstappen’s fans, said: “It was definitely tough. We always make it difficult for ourselves.

“It is strange to think we were the only one on the grid at the re-start but these things happen.

“I was telling the team how the track was throughout the lap on to the way to the grid, but they said rain was coming. I saw everyone diving in to the pits, but anyways.”

Vettel added: “I am a little bit disappointed but Esteban did not make a mistake and I could not get close enough.

“He stayed on track and it is well deserved that he celebrates his first victory.”

Ocon, who started eighth, said: “What a moment. We’ve had some difficult moments this season but we are back where we belong.

“Sebastian put me under big pressure but we managed to keep him off, so it’s a great moment.”