Toyota took provisional pole position for the Le Mans 24 Hours courtesy of a last-gasp lap from Kazuki Nakajima in a thrilling conclusion to an incident-filled second qualifying session.
Nakajima underlined the Toyota TS040 Hyrbid's status as pre-race favourite by clinching top spot ahead of tonight's final part of qualifying, but Porsche's pair of 919 Hybrids pushed the Japanese manufacturer hard.
A late flier from Timo Bernhard looked set to consolidate the #20's position at the top of the times until Nakajima twice improved late on.
With five minutes remaining, the Japanese split the two Porsches to lift Toyota onto the front row, and then eclipsed Bernhard's 3m22.908s by more than three-tenths of a second.
Romain Dumas then took second in the #14 Porsche, putting it ahead of its sister car but falling just 0.119s short of wresting back provisional pole from Toyota.
Oliver Jarvis was another to go faster right at the end of the session, putting the #3 Audi R18 e-tron quattro fourth.
It means the lead quartet comprises one of each of the three manufacturers and is covered by 0.7s going into the final part of qualifying, which has been extended by half an hour and will now start at 2130 local time.
That is because of a pair of red flag interruptions, the second of which came just after the #1 Audi - rebuilt following Loic Duval's huge crash in practice - was involved in a pair of accidents.
Lucas di Grassi had just gone seventh when he spun exiting Indianapolis and hit the left-hand side barrier, damaging his repaired Audi's front end.
He was able to continue, slowly, but on his way back to the pits inadvertently caused a huge crash for the #29 Pegasus Morgan-Nissan.
Leo Roussel attempted to pass di Grassi at speed approaching the Ford chicane, but took to the grass to avoid the Audi as it jinked left. He spun and speared across the track, slamming hard into the barrier.
Both drivers were summoned to race control over the incident.
That accident, which unsurprisingly brought out the red flags as it came to a halt just by the entry to the pitlane, capped a chaotic couple of minutes.
In addition to di Grassi's own spin, the #79 ProSpeed Porsche drive by Bret Curtis spun on the approach to the Dunlop chicane and hit the tyre barriers.
The #46 TDS Racing Ligier-Nissan took provisional LMP2 pole courtesy of Tristan Gommendy.
The Frenchman's 3m38.094s just shaded the #48 Murphy ORECA-Nissan, in which Nathanael Berthon had earlier gone fastest.
The #36 Signatech ORECA is now third, having also held top spot by bumping Wednesday night's pacesetting LMP2 outfit, the #26 OAK Racing Morgan-Nissan, which fell to fourth.
Ferraris still lead the way in both GT divisions. Gianmaria Bruni's 3m54.754s remains good enough to have the #51 AF Corse Ferrari 458 Italia on provisional Pro pole, but its closest challenger is now the #73 Chevrolet Corvette.
Jan Magnussen was a steady improver in the new-for-2014 CR.7, and he pushed the #97 Aston Martin Racing entry into third with a late effort that shade the sole Vantage's best by 0.029s.
It was a less successful session for the #71 AF Corse Ferrari, in which James Calado had caused the first of the session's two red flags when he crashed at the Porsche Curves.
The SMP Ferrari remains on GTE Am pole, just ahead of the #81 AF entry.
Pos Cl Car Drivers Time Laps
1. LMP1 #7 Toyota Wurz/Sarrazin/Nakajima 3m22.589s 20
2. LMP1 #14 Porsche Dumas/Jani/Lieb 3m22.708s 14
3. LMP1 #20 Porsche Bernhard/Webber/Hartley 3m22.908s 17
4. LMP1 #3 Audi Albuquerque/Bonanomi/Jarvis 3m23.271s 20
5. LMP1 #8 Toyota Davidson/Lapierre/Buemi 3m23.661s 19
6. LMP1 #2 Audi Fassler/Lotterer/Treluyer 3m24.276s 19
7. LMP1 #1 Audi Di Grassi/Gene/Kristensen 3m26.490s 10
8. LMP1 #12 Rebellion Prost/Heidfeld/Beche 3m31.180s 16
9. LMP1 #13 Rebellion Kraihamer/Belicchi/Leimer 3m31.608s 16
10. LMP2 #46 Ligier Thiriet/Badey/Gommendy 3m38.094s 16
11. LMP2 #48 Oreca Berthon/Gonzalez/Chandhok 3m38.207s 14
12. LMP2 #36 Alpine Chatin/Panciatici/Webb 3m38.769s 20
13. LMP2 #43 Morgan Klien/Hirsch/Brandela 3m39.135s 16
14. LMP2 #35 Ligier Brundle/Mardenborough/Shulzhitskiy 3m39.523s 16
15. LMP2 #24 Oreca Rast/Charouz/Capillaire 3m40.407s 9
16. LMP2 #47 Oreca Howson/Bradley/Imperatori 3m40.476s 19
17. LMP2 #26 Morgan Rusinov/Pla/Canal 3m41.446s 16
18. LMP2 #29 Morgan Schell/Leutwiller/Roussel 3m42.438s 11
19. LMP2 #27 Oreca Zlobin/Salo/Ladygin 3m42.527s 18
20. LMP2 #41 Zytek Munemman/Latif/Winslow 3m44.293s 19
21. LMP2 #37 Oreca Ladygin/Minassian/Mediani 3m44.395s 6
22. LMP2 #34 Oreca Frey/Mailleux/Lancaster 3m44.486s 12
23. LMP2 #38 Zytek Dolan/Tincknell/Turvey 3m44.842s 12
24. LMP2 #50 Morgan Ragues/Taylor/Ihara 3m47.015s 11
25. LMP2 #42 Zytek Kimber-Smith/McMurry/Dyson 3m47.255s 18
26. LMP2 #33 Ligier Cheng/Tung/Fong 3m48.325s 17
27. GTEP #73 Chevrolet Magnussen/Garcia/Taylor 3m55.038s 17
28. GTEP #51 Ferrari Bruni/Vilander/Fisichella 3m55.552s 18
29. GTEP #97 Aston Turner/Mucke/Senna 3m56.516s 11
30. GTEP #52 Ferrari Griffin/Parente/Leo 3m56.642s 18
31. GTEA #61 Ferrari Perez-Companc/Cioci/Venturi 3m56.917s 16
32. GTEA #95 Aston Poulsen/Heinemeier-Hansson/Thiim 3m56.994s 12
33. CDNT #0 Nissan Ordonez/Reip/Motoyama 3m57.096s 9
34. GTEP #74 Chevrolet Gavin/Milner/Westbrook 3m57.160s 12
35. GTEP #92 Porsche Holzer/Makowiecki/Lietz 3m57.356s 13
36. GTEA #98 Aston Dalla Lana/Lamy/Nygaard 3m57.455s 15
37. GTEA #81 Ferrari Wyatt/Rugolo/Bird 3m57.665s 18
38. GTEP #91 Porsche Pilet/Bergmeister/Tandy 3m57.682s 17
39. GTEP #71 Ferrari Rigon/Calado/Beretta 3m58.086s 9
40. GTEA #77 Porsche Dempsey/Foster/Long 3m58.373s 16
41. GTEA #66 Ferrari Al Faisal/Neiman/Pumpelly 3m58.512s 16
42. GTEA #72 Ferrari Bertolini/Shaitar/Basov 3m58.778s 18
43. GTEA #79 Porsche MacNeil/Curtis/Bleekemolen 3m59.012s 12
44. GTEA #75 Porsche Perrodo/Collard/Palttala 3m59.604s 17
45. GTEA #88 Porsche Ried/Bachler/Al Qubaisi 3m59.920s 17
46. GTEA #60 Ferrari Mann/Case/Giammaria 4m01.425s 16
47. GTEA #70 Ferrari Nakano/Ehret/Rich 4m01.446s 17
48. GTEA #57 Ferrari Krohn/Jonsson/Collins 4m01.686s 19
49. GTEA #53 Ferrari Mowlem/Patterson/Hamilton 4m02.175s 17
50. GTEA #67 Porsche Maris/Merlin/Helary 4m03.903s 3
51. GTEA #76 Porsche Narac/Armindo/Hallyday 4m06.021s 7
52. GTEA #58 Ferrari Barthez/Pons/Ayari 4m07.434s 16
53. GTEA #62 Ferrari Mallegol/Bachelier/Blank 4m20.025s 12
54. GTEA #90 Ferrari Montecalvo/Roda/Ruberti 2