IF at first you don’t succeed . . . well, Toyota tried and tried again – many times – and has finally won the historic 24 Hours of Le Mans.

Taking the number No. 8 Toyota TS050 Hybrid across the line were Kazuki Nakajima, Sébastien Buemi and Fernando Alonso, with the No. 7 sister car of Mike Conway, Kamui Kobayashi and José María López taking second spot.

The two Toyotas held the lead for the entire race, swapping positions several times, before Nakajima took the chequered flag after covering a mammoth 5286km.

The win was only the second time in 86 years of the classic French race that a Japanese carmaker had, and Nakajima became the first Japanese driver to win in a Japanese car.

Both cars ran in the premier LMP1 category for prototypes and were powered by a 2.4-litre V6 turbocharged petrol engine combined with an 8MJ hybrid system that generates a  combined output of 735kW.

Winner of the LMP2 class was Jean-Eric Vergne behind the wheel of an Oreca 07 at the end of the long 24 hours.

Porsche dominated the GTE Pro class with its two 911 RSR race cars, one dubbed the Pink Pig, with the Chip Ganassi Team USA Ford GT third.

The GTE AM class was another win for Porsche.

Toyota Racing president Hisatake Murata said he was immensely proud of the efforts of the entire team.

“It has been our dream to win Le Mans and finally we have achieved it,” he said.

“To win Le Mans for Toyota after so many frustrations and disappointments is a truly magical moment.”

The drivers were also ecstatic.

“It’s great to be here finally; it has been a long time,” Nakajima said.

“I am almost speechless. I had great teammates and Toyota gave us a very strong car.”

For two-time Formula 1 world champion Fernando Alonso, the victory was also sweet, especially after a frustrating time in F1 over the past two seasons.

“It has been amazing,” the charismatic Spaniard said.

“We know how important and iconic Le Mans is in the world of motorsport and as a team we achieved an amazing result.

“Every moment was a reminder of how tough and long this race is, anything can happen so we tried to execute our race and stay calm.”

Toyota Racing’s double podium at Le Mans follows its 1-2 success in Belgium.

It now leads the World Endurance Championship.

Next race in the series will be the 6 Hours of Silverstone on August 17-19.