Lopez had more than two minutes in hand when he pitted to replace a suspected front-right puncture, but it was in fact the left-rear that needed changing, forcing the Argentinian to limp back to the pits. He resumed 50s down on Nakajima in the #8 car once the issue was solved.

After assuming the lead when Nakajima made his final routine stop, Lopez pitted for the final time with 20 minutes to go and took the flag only 16s in arrears.

Minute by minute coverage:

Victory for Alonso, Nakajima and Buemi also guaranteed them FIA World Endurance Championship honours, with Buemi earning that accolade for the second time after his 2014 triumph.

The best of the non-hybrid LMP1s dropped off the lead lap early in hour five, and by the finish the third-placed car, SMP Racing's #11 BR Engineering BR1, was six laps down on the winning car.

Le Mans debutant Stoffel Vandoorne and his teammates in the #11 car, Mikhail Aleshin and Vitaly Petrov, enjoyed a virtually-trouble free run to ensure SMP came out on top against its main rival Rebellion Racing, which suffered dramas with both of its R-13s.

The #3 survived a crash for Thomas Laurent in the evening without losing a lap, thanks to rapid pitwork and a well-timed safety car, but Gustavo Menezes was less fortunate when he got the car beached in the gravel at the Porsche Curves with just over six hours to go.

That was followed by numerous trips to the garage that left the #3 machine down in fifth and 15 laps down on the winning car, five laps behind the #1 Rebellion of Neel Jani, Bruno Senna and Andre Lotterer which had dropped out of the fight for privateer honours before night fell.

SMP could have made it a three-four if not for a terminal crash at the Porsche Curves for Egor Orudzhev in the #17 BR1 he shared with Stephane Sarrazin and Sergey Sirotkin.

Neither of the remaining LMP1s, the DragonSpeed BR1 and the ByKolles entry, were still in the race by sunrise. The #10 BR1 was plagued and ultimately halted by persistent electronic gremlins, while the #4 ENSO CLM P1/01 suffered a terminal gearshift problem in the early hours.

LMP2: Signatech Alpine seals dominant victory

Signatech trio Nicolas Lapierre, Pierre Thiriet and Andre Negrao secured a dominant victory in the LMP2 division in their #36 Alpine-branded Oreca, backing up their inherited victory of last year and also securing WEC class championship victory in the process.

Their triumph again owed much to G-Drive Racing hitting trouble, as the #26 Aurus-badged Oreca shared by Roman Rusinov, Jean-Eric Vergne and Job van Uitert gave up a dominant three-minute lead after losing 20 minutes to a wiring issue during a routine stop in hour 19.

From there, the #36 crew was not challenged for victory, having already established a lap's buffer over the #38 Jackie Chan DC Racing Oreca shared by Ho-Pin Tung, Stephane Richelmi and Gabriel Aubry, which lost ground when the car lost a lap with a puncture.

Third place went to the polesitting #28 TDS Oreca of Loic Duval, Matthieu Vaxiviere and Francois Perrodo, who enjoyed an easy run to what became the final podium place after Pastor Maldonado crashed the #31 DragonSpeed Oreca at Tertre Rouge with just under seven hours remaining.

Best of the non-Orecas was the fourth-placed United Autosports LMP2 of Phil Hanson, Paul di Resta and Filipe Albuquerque, two laps down, ahead of the IDEC Sport Oreca and the G-Drive car, which was able to recover from its issue to finish sixth, four laps down.

The sister Jackie Chan DC Racing car failed to finish after suffering a gearbox failure while running inside the top five.

GTE Pro: Ferrari wins after Corvette heartbreak

Ferrari scored its first GTE Pro class victory since 2014 thanks to the efforts of James Calado, Alessandro Pier Guidi and Daniel Serra in the #51 AF Corse 488 GTE.

The vagaries of the safety car periods had essentially turned the battle for honours into a two-horse race between the #51 Ferrari and the #63 Corvette of Antonio Garcia, Jan Magnussen and Mike Rockenfeller heading into the morning hours.

However, the 21st-hour intervention caused by Nyck de Vries’ high-speed off in the Racing Team Nederland Dallara at Indianapolis led to the #63 car getting held at the end of pitlane, which handed the #51 Ferrari a one-minute lead it would never lose.

Any chance of Corvette salvaging a podium finish was lost when Magnussen spun at the Porsche Curves, making light contact with the barriers, which cost the car two laps. A further 15-minute trip to the garage left it five laps off the pace.

Corvette had already lost one car when Marcel Fassler hit the barriers at the same part of the track with force towards the end of the sixth hour, the result of contact with the #88 Dempsey-Proton Porsche of Satoshi Hoshino for which the stewards judged Fassler to blame.

Behind the winning Ferrari, Porsche filled out the remaining spots on the podium, with the #91 car of Gianmaria Bruni, Frederic Makowiecki and Richard Lietz beating the best of the IMSA entries, the #93 of Nick Tandy, Earl Bamber and Patrick Pilet, by under 20s.

Ford’s quartet of retro-liveried GTs filled out the next four places, led by the #68 machine of 2016 class winners Sebastien Bourdais, Dirk Muller and Joey Hand.

Exhaust problems in the night cost the #92 Porsche crew any of chance of defending their 2018 victory, but 10th and fifth among the WEC points-scoring cars was enough to ensure Kevin Estre and Michael Christensen came away with title honours.

Both BMW and Aston Martin had races to forget, BMW’s top finisher finishing six laps down in 11th and both Astons suffering problems in the night.

Marco Sorensen’s violent crash at Indianapolis in the #95 Vantage GTE, which had started on pole, made it one of three non-finishers in the class, along with the #64 Corvette and the #71 Ferrari, which suffered engine troubles.

GTE Am: Keating Ford survives late scare

Keating Motorsports' privateer Ford GT, piloted by Ben Keating, Jeroen Bleekemolen and Felipe Fraga, held on for a narrow win in GTE Am, surviving a late scare when owner-driver Keating picked up a stop-and-go-penalty.

The Wynn's-liveried #85 machine had led by as much as a lap, but in the closing hours the #56 Project 1 Porsche of Jorg Bergmeister, Egidio Perfetti and Patrick Lindsey had worked its way back into the fray even before Keating earned his penalty for spinning his wheels in a pitstop.

That infraction reduced a 36s lead to less than 5s, but Bleekemolen was able to pull away in the final hour to secure victory by around 50s, helped by a late splash for Bergmeister - who nonetheless sealed WEC GTE Am class title honours along with his teammates.

The final spot on the class podium went to the JMW Motorsport Ferrari of Rodrigo Baptista, Jeff Segal and Wei Lu, which ended up only 40 seconds behind the Project 1 Porsche.