Le Mans, France - Double Formula One world champion Fernando Alonso struck lucky with a second successive victory in the Le Mans 24 Hours race on Sunday with Toyota team-mates Kazuki Nakajima and Sebastien Buemi.
The number eight car crew, who were set for second until late drama, were also crowned world endurance champions with Nakajima driving the final stint and becoming the first Japanese to win a global FIA-sanctioned series.
Toyota's number seven TS050 hybrid, driven by Britain's Mike Conway, Japan's Kamui Kobayashi and Argentina's Jose Maria Lopez, had a two-minute advantage before a puncture shattered their hopes with an hour to go.
The team changed the wrong tyre, due to a sensor issue, meaning the car had to limp around and pit again before rejoining in second place in a one-two finish for the Japanese manufacturer.
The winning margin, after 385 laps of the Sarthe circuit in the 87th edition of a race watched by a crowd of 252 000, came down to 16.972 seconds.
Alonso, 37, recognised fortune had played a big part in completing the unprecedented feat of winning Le Mans twice in one 'super-season', a one-off scheduled to readjust the calendar so it finishes with the endurance classic in future.
"The main goal this weekend was to win the championship," the Spaniard, who won his Formula One titles with Renault in 2005 and 2006, told Eurosport television.
"I think car seven was quicker than us for 24 hours, they really deserved the victory but today the luck decided that we have to take the trophy.
"Luck sometimes plays an important part in motorsport and today we feel extremely lucky and maybe we don't deserve it but we take it," added the former Ferrari and McLaren driver who left Formula One last year.
"The world championship feels right at this moment."
The number eight crew had needed only a top-seven finish to be sure of the title.
Triple crown
Alonso's former McLaren Formula One team mate Stoffel Vandoorne, a Le Mans rookie, joined him on the podium in the third-placed number 11 SMP Racing BR Engineering car shared with Russians Vitaly Petrov and Mikhail Aleshin.
That non-hybrid car finished seven laps off the pace.
The two Toyota TS050 hybrids had started first and second, with the number seven car leading but with the gap repeatedly narrowed by safety car periods.
Toyota remained in control throughout, with only the risk of mechanical failure or driver error to worry about in a top LMP1 category they have dominated as the sole major manufacturer.
"We wanted to make it really boring, but that didn’t happen," said Toyota team boss Rob Leupen.
"We got into a situation where we caught a puncture at the end, and it hurts a lot that the team didn't respond well to that."
The title was the second of Buemi's endurance career, after a first in 2014, and an addition to the all-electric Formula E crown the Swiss won in 2015-16.
Alonso, a two-time winner of the Monaco Grand Prix, is now leaving the series and hoping to become only the second driver after the late Briton Graham Hill to complete the so-called 'Triple Crown of Motorsport'.
The Spaniard needs to win the Indianapolis 500 to complete that, a race he failed to qualify for this year after leading for 27 laps on his debut in 2017.
The racing was punctuated by crashes, with Venezuelan former F1 driver Pastor Maldonado hitting the barriers at Tertre Rouge in the number 31 Dragonspeed LMP2 after daybreak and bringing out the safety car.
Before that, the number 17 SMP spun out of third place in the early hours with Russian Egor Orudzhev at the wheel.