How Esteban Ocon overcame chaos to win the Hungarian Grand Prix

Esteban Ocon's stunning maiden victory at the Hungarian Grand Prix happened after a remarkable sequence of events which started in the opening moments of the race.

Ocon had qualified an impressive eighth position on Saturday and lined up ahead of Alpine teammate Fernando Alonso and Aston Martin's Sebastian Vettel.

By the time the race finished on Sunday, both played a significant role in his maiden F1 win -- Alonso held off Mercedes' Lewis Hamilton for a crucial spell in the race, while Vettel chased Ocon all the way to the finish line but was unable to get by.

This is how the remarkable chaos unfolded and how Ocon kept his cool to win the race.

Lap 1 - Valtteri Bottas made a slow start from second position and misjudges his braking point, ploughing into the back of Lando Norris, who had got past him on the run down to Turn 1. Norris' McLaren hit Red Bull's Max Verstappen while Bottas' car took out Sergio Perez's.

Further back, Lance Stroll tried to avoid the carnage and went over Turn 1, but clattered into Charles Leclerc's Ferrari. McLaren's Daniel Ricciardo was also spun around in the pile-up.

Bottas, Stroll, Leclerc and Perez were eliminated from the race.

Ocon was one of the big gainers from the early chaos and found himself running in second position behind Lewis Hamilton. The debris at Turn 1 meant the Safety Car was deployed, before the race was red-flagged.

The debris scattered across Turn 1 prompted a Safety Car, although that soon became a red flag, giving drivers the chance to return to the pits for repairs.

Red flag stoppage: Verstappen had managed to get his damaged car back to the pits, although part of its barge board had come loose after his stop. Red Bull worked on this during the stoppage but were unable to completely fix his damaged car.

Norris also made it back to the pit-lane, but McLaren was forced to retire his car.

Crucially, the rain eased off during the delay to the race posing the option of switching to slicks, although none of the teams did so when they had the opportunity under the red flag.

Lap 3: The restart order was supposed to be Hamilton, Ocon, Vettel, Carlos Sainz, Yuki Tsunoda and Nicholas Latifi, but the vast majority of the field dashed into the pit-lane for dry-weather tyres given the changed weather conditions. The only driver who stayed out was Hamilton.

That left the near-farcical sight of Hamilton being the lone car on the grid, with intermediate wet tyres on his car, as the lights went out to signal the race restart.

Mercedes later explained that had Hamilton pitted, the pit wall felt he would have dropped to sixth regardless due to the positioning of the Mercedes pit box at the entry of the pit lane and the flow of cars that would have come in behind him. Releasing a car unsafely into the path of another results in a penalty, so Mercedes was wary of this outcome.

However, they did not expect to be the only car not to pit and later admitted that a race win may have been possible had they put slicks on Hamilton's car straight away.

Those drivers who had stopped for fresh tyres queued up behind Ocon and were only allowed to start once Hamilton had gone by.

The nature of the layout of the pit lane meant that George Russell, who entered the pits in eighth place, queued behind his teammate Latifi for new tyres in the Williams pit box at the end of the pit lane while a queue of serviced cars started to line up on his left. When Russell finally had slick tyres on his car, he couldn't rejoin at the back of the queue without reversing, which is against the rules, so simply drove to the end of the queue alongside Ocon.

As a result, he briefly ran in second after overtaking Ocon on the exit of the pits, but was soon told by his team that he had to cede a few positions. Russell obliged and dropped back down the order.

When Hamilton pitted at the end of the lap, Ocon inherited the lead.

Lap 4: "Am I now last!?"

An incredulous Lewis Hamilton was baffled as to how he had ended up at the back of the pack.

Out in front, Ocon's mirrors were full of Vettel's car, as they would be for the majority of the race.

Lap 5: Ocon and Vettel start to build a gap on the rest, with third-placed Latifi proving to be something of a road block.

At this point in the race Williams driver Russell told his team they should compromise his own race if it will help Latifi in any way.

Lap 14: Verstappen, struggling to get maximum pace out of his wounded car, finally got past Mick Schumacher -- driving the slowest car on the grid -- after several failed attempts in the preceding laps.

Lap 20: Hamilton, running behind Pierre Gasly in 11th, pitted for hard tyres, a decision which would prompt a flurry of activity for the next few laps and rocket Hamilton up the order.

Lap 21: Verstappen and Ricciardo followed suit and pitted for new tyres themselves.

Ricciardo held position ahead of Verstappen and as the pair exited the pit-lane Hamilton swooped around the outside. It would prove to be a crucial moment in Hamilton's fight back through the field, as he avoided being stuck behind two cars which seemed to be carrying damage from the first-lap carnage.

Lap 24: Carlos Sainz objected to Ferrari's call to pit for fresh tyres, saying his pace was good and he wanted to stay out. This will prove to be something of a masterstroke which left Sainz in podium contention until the final laps of the race.

Lap 32: Hamilton got by Yuki Tsunoda on the outside of Turn 4, a significant move as the AlphaTauri driver was one of the only cars in the lead pack to have made the same switch to hard tyres.

Lap 37: Vettel pitted from second position. The stop is slightly slow, with the left-rear tyre taking a while to go on and costing Vettel around a second. That will be a costly delay for Aston Martin.

Lap 38: Ocon and Alpine followed suit by pitting a lap later.

The tardy Vettel stop proved decisive, with Ocon emerging marginally ahead of the Aston Martin driver. Ocon weathered several corners of Vettel attacks to hold the lead.

Lap 40: Having led for two laps, Alonso pitted in the other Alpine. He will go on to play a vital role in his teammate winning the race.

Lap 48: As he did in Hungary last year, Hamilton pitted again to attack with a fresh set of tyres.

He is told by race engineer Peter Bonnington: "It's going to be hammer time all the way."

On raw pace, Mercedes believed Hamilton still had plenty in the tank to catch and pass the lead cars, including Ocon, but he could not afford to get stuck behind any of the drivers ahead of him for too long.

Lap 49: Ocon almost relinquished the lead after getting caught out by Kimi Raikkonen's backmarking Alfa Romeo at Turn 1, but manages to keep the opportunistic Vettel behind.

Lap 55: Hamilton closed right up to Alonso but is about to spend 10 laps looking for a way past. On this occasion, Alonso defended at Turn 1 and then again at Turn 3 and 4, holding the racing line and forcing Hamilton to try and find a way around the outside.

Lap 57: Alonso defended the same way again at the same two corners.

Lap 63: After easing off for a few laps, Hamilton attacked again but could not get by.

The seven-time world champion complained Alonso had moved over late, something which is deemed penalty-worthy by the stewards.

Lap 65: Hamilton finally got by Alonso when the Spaniard locked up and ran wide at Turn 1.

He has kept Hamilton behind him for 10 crucial laps. By the time Hamilton got by, his chances of catching Ocon and Vettel were significantly diminished.

Speaking after the race, Alonso said: "I didn't know that that was enough to hold the victory for Esteban. Lewis had an amazing pace in the last couple of laps but it was not enough.

"I tried to give enough space, but not too much space, because if not he would pass."

Lap 66: Hamilton immediately caught and passed the Ferrari of Sainz, who later complained Daniel Ricciardo had not obeyed blue flags correctly as they approached Turn 1. Whatever the story, Sainz was unable to keep Hamilton behind him and lost a podium position.

Lap 69: Hamilton closed right up to the lead pair but would finish the race 0.8 adrift of Vettel, who in turn was 1.8s behind race winner Esteban Ocon.

"What a moment, what a moment," Ocon said after the race. "It feels so good. It's the first victory obviously since the Renault group came back to Formula One.

"We had some difficult moments this season and we overcame them together with the team, came back to a fantastic pace in Silverstone."