Toyota escaped a penalty when the number eight car's wheels were seen to be moving before it had touched the ground, which is not permitted, during the pit stop when Alonso handed the vehicle to Nakajima for the final two stints before the finish.
The triumph, expected after champions Porsche withdrew past year, came at the 20th attempt for Toyota who became only the second Japanese manufacturer to win the world's greatest endurance race after Mazda in 1991.
Nakajima - who had clinched the pole position - finished in the vehicle, the Japanese driver enjoying a moment of redemption after a technical problem cruelly denied him and Toyota victory in the closing stages two years ago. Though the #8 vehicle started on pole, both it and #7 swapped places for the first quarter of the race, before #8 was hit with a 60-second stop-go penalty for speeding. Kobayashi qualified his auto in second place, exactly two minutes behind Nakajima, but it should be noted that Kobayashi still holds the all-time qualifying lap record from his 2017 run. The Toyota Gazoo racing team finally managed to score a victory at the legendary 24 Hour race. Win that and he will join the legendary Graham Hill as only the second driver to win the Triple Crown.
"Le Mans once a year is not enough!"
But in a series of stints in the dead of night, Alonso clawed back the deficit and put the number eight vehicle right back on the tail of the number seven.
Jenson Button, the 2009 F1 world champion, was competing in the non-hybrid LMP1 class for the Russian SMP team. The rules are targeting a 3:20.00 lap around Circuit De La Sarthe, just six seconds slower than the current lap record, set by Kamui Kobayashi in 2017.
2 feared dead, 41 hurt after quake hits Japan
Railway services in Osaka, Shiga, Kyoto and Nara, both high speed bullet trains and local rail services, were halted. An 84-year-old man in nearby Ibaraki died after a bookshelf fell on top of him at home, according to city officials.
Having dominated qualifying earlier in the weekend, Porsche emerged victorious with its #92 GT Team entry in GTE Pro, with the "Pink Pig" 911 RSR of Michael Christensen, Kevin Estre and Laurens Vanthoor beating its fellow #91 auto which finished in second place in the premier GT category.
Their work on reliability over the winter has paid off with no sign of the mechanical failures that had plagued the team since 2012.
There have been questions about whether it was a demonstration rather than a race, because of the obvious promotional benefits for all involved if Alonso won. Just the Indy 500 left for Alonso, then...
It was the No. 8 vehicle of Fernando Alonso, Kazuki Nakajima, and Sébastien Buemi that took the checkered flag.
He will be back in action for McLaren at the French Grand Prix next week, with the race returning to the calendar for the first time since 2008.