Toyota claimed a first World Endurance Championship victory since 2014 in a dramatic finish on home ground at Fuji.
Kamui Kobayashi, Mike Conway and Stephane Sarrazin took victory by just 1.4 seconds from the Audi of Oliver Jarvis, Lucas di Grassi and Loic Duval in a race that all three LMP1 manufacturers had a chance of winning.
The victorious Toyota TS050 HYBRID was in the hunt all the way, but it ultimately prevailed over its rivals courtesy of two tactical calls in the closing stages.
Toyota short-fuelled the car at its penultimate pitstops, which allowed Kobayashi to move into second place ahead of the #1 Porsche with Timo Bernhard at the wheel.
The Toyota Motorsport GmbH team then opted not to change the #6 car's tyres at the final pitstop, which gave Kobayashi an advantage of a dozen or so seconds over erstwhile leader Duval.
The #8 Audi R18 e-tron quattro was able to close on the Toyota and was only 1.1s down as the cars crossed the line with two laps to go, but Duval was ultimately unable to get close enough to mount a bid for the lead.
Kobayashi said: "I think we had the performance all week and the team did a great job.
"It was really hard, harder than expected, and we had to really fight to achieve it."
The #8 Audi led for most of the way, but its advantage never stood at more than 10s over the course of a race in which the fastest car from each of the manufacturers were evenly matched.
The third-placed Porsche 919 Hybrid shared by Bernhard, Mark Webber and Brendon Hartley ran second initially but later dropped behind the Toyota.
The car came back into the frame in the middle of the race, overhauling the Toyota, before losing out in the tactical exchange at the end and dropping performance with an aerodynamic problem.
The second Toyota shared by Kazuki Nakajima, Sebastien Buemi and Anthony Davidson wasn't as consistently quick as its sister car and ended up nearly a minute down in fourth.
Fifth place went to Porsche's championship-leading line-up of Romain Dumas, Marc Lieb and Neel Jani, after their car was afflicted by a handling issue that prevented it matching the pace of the sister car.
The #7 Audi of Benoit Treluyer, Andre Lotterer and Marcel Fassler retired in the opening hour with a hybrid motor failure.
Ford dominated GTE Pro on the way to the British-based Ganassi squad's first win of the season and the marque's second after the Le Mans 24 Hours triumph by the sister US squad.
The Ford GT shared by Harry Tincknell and Andy Priaulx triumphed over the sister car of Olivier Pla and Stefan Mucke by 15s.
Tincknell manage to get past Pla at the start, but was never more than a few seconds ahead prior to a spin by the Frenchman in the fifth hour.
The two AF Corse Ferrari 488 GTEs finished third and fourth but were never in contention for victory.
G-Drive Racing finally claimed its first LMP2 victory after a season of bad luck.
Will Stevens - standing in for Rene Rast - Roman Rusinov and Alex Brundle led for much of the race in their Jota-run ORECA-Nissan 05, but had to come from behind at the end to seal the victory.
The OAK-run RGR Sport squad's strategy got Bruno Senna out ahead of Stevens after the final round of stops, but the G-Drive car on the fresher tyres was able to catch and pass the Ligier-Nissan JSP2.
Stevens was, however, adjudged to have exceeded track limits because he drove over the white line next to the pitwall as he made the pass and had to yield the position to Senna.
The G-Drive car came back at the Ligier Senna shared with Filipe Albuquerque and Ricardo Gonzalez and was able to seal the victory with five minutes to go.
GTE Am honours were taken for the fourth time this season by the Aston Martin Vantage GTE of Pedro Lamy, Mathias Lauda and Paul Dalla Lana.
They finished a lap up on class points leaders Emmanuel Collard, Francois Perrodo and Rui Aguas in their AF-run Ferrari 458 Italia.
RESULTS - 223 LAPS
|1||LMP1||S.Sarrazin, M.Conway, K.Kobayashi||Toyota Gazoo Racing||Toyota||6h00m37.284s|
|2||LMP1||L.di Grassi, L.Duval, O.Jarvis||Audi Sport Team Joest||Audi||1.439s|
|3||LMP1||T.Bernhard, M.Webber, B.Hartley||Porsche Team||Porsche||17.339s|
|4||LMP1||A.Davidson, S.Buemi, K.Nakajima||Toyota Gazoo Racing||Toyota||53.779s|
|5||LMP1||R.Dumas, N.Jani, M.Lieb||Porsche Team||Porsche||1 Lap|
|6||LMP1||M.Tuscher, D.Kraihamer, A.Imperatori||Rebellion Racing||Rebellion/AER||15 Laps|
|7||LMP2||R.Rusinov, A.Brundle, W.Stevens||G-Drive Racing||ORECA/Nissan||21 Laps|
|8||LMP2||R.Gonzalez, B.Senna, F.Albuquerque||RGR Sport by Morand||Ligier/Nissan||21 Laps|
|9||LMP2||G.Menezes, N.Lapierre, S.Richelmi||Signatech Alpine||Alpine/Nissan||21 Laps|
|10||LMP2||A.Giovinazzi, G.van der Garde, S.Gelael||Extreme Speed Motorsports||Ligier/Nissan||21 Laps|
|11||LMP2||R.Dalziel, P.Derani, C.Cumming||Extreme Speed Motorsports||Ligier/Nissan||22 Laps|
|12||LMP2||J.Kane, L.Williamson||Strakka Racing||Gibson/Nissan||22 Laps|
|13||LMP2||M.Rao, R.Bradley, R.Merhi||Manor||ORECA/Nissan||22 Laps|
|14||LMP2||N.Minassian, M.Mediani, M.Aleshin||SMP Racing||BR Engineering/Nissan||22 Laps|
|15||LMP2||D.Cheng, H-Pin Tung, P-L.Chatin||Baxi DC Racing Alpine||Alpine/Nissan||23 Laps|
|16||LMP2||V.Petrov, V.Shaytar, K.Ladygin||SMP Racing||BR Engineering/Nissan||24 Laps|
|17||GTE Pro||A.Priaulx, H.Tincknell||Ford Chip Ganassi Team UK||Ford||32 Laps|
|18||GTE Pro||S.Mucke, O.Pla||Ford Chip Ganassi Team UK||Ford||32 Laps|
|19||GTE Pro||G.Bruni, J.Calado||AF Corse||Ferrari||32 Laps|
|20||GTE Pro||D.Rigon, S.Bird||AF Corse||Ferrari||32 Laps|
|21||GTE Pro||N.Thiim, M.Sorensen||Aston Martin Racing||Aston Martin||33 Laps|
|22||GTE Pro||R.Stanaway, D.Turner||Aston Martin Racing||Aston Martin||33 Laps|
|23||GTE Pro||R.Lietz, M.Christensen||Dempsey Racing - Proton||Porsche||34 Laps|
|24||GTE Am||P.D.Lana, P.Lamy, M.Lauda||Aston Martin Racing||Aston Martin||36 Laps|
|25||GTE Am||F.Perrodo, E.Collard, R.Aguas||AF Corse||Ferrari||37 Laps|
|26||GTE Am||C.Ried, W.Henzler, J.Camathias||KCMG||Porsche||38 Laps|
|27||GTE Am||M.Wainwright, A.Carroll, B.Barker||Gulf Racing||Porsche||39 Laps|
|28||GTE Am||K.Al Qubaisi, D.H.Hansson, P.Long||Abu Dhabi-Proton Racing||Porsche||44 Laps|
|29||LMP2||T.Graves, A.Lynn, S.Nakano||Manor||ORECA/Nissan||54 Laps|
|30||GTE Am||Y.Yamagishi, P.Ragues, R.Taylor||Larbre Competition||Chevrolet||97 Laps|
|-||LMP1||S.Trummer, O.Webb, P.Kaffer||ByKOLLES Racing Team||CLM/AER||Retirement|
|-||LMP1||M.Fassler, A.Lotterer, B.Treluyer||Audi Sport Team Joest||Audi||Retirement|