It was delight sandwiched between devastation for Porsche at the 24 Hours of Le Mans, with its top-flight LMP1 team clawing its way out of the drama-filled race to claim victory.

The No. 1 Porsche 919 Hybrid was virtually in cruise control following twin disasters that left rival Toyota all but out of contention less than halfway through the race. But with roughly 210 minutes to go, the race-leading Porsche suffered a mechanical failure that forced it into early retirement. With two Toyota TS050 Hybrids already out of the race, it looked as though an LMP2 car was bound to win the famed race through the French countryside.

But Le Mans is a war of attrition, and the No. 2 Porsche 919 was able to overcome a lead of almost a dozen laps to finish atop the podium. The win completes the hat trick for Porsche after the team won each of the last two years. Rounding out the podium were the No. 38 Oreca 07-Gibson of Jackie Chan DC Racing and the No. 13 Oreca 07-Gibson of Vaillante Rebellion Racing, which finished second and third overall, respectively.

ALSO SEE: Follow Along as We Try to Stay Awake for All 24 Hours of Le Mans

Only the Strong Survive

After looking like the stronger team for most of the first 11 hours of the race, two of the three Toyota TS050 Hybrids running in this year’s race suffered serious failures that took them both out of contention for the win. It also opened the door for Porsche which, despite its LMP1 cars struggling to keep pace, was suddenly free and clear to build a solid lead over the rest of the pack.

The trouble for Toyota began after the race restarted following an unrelated safety car. A clutch issue rendered the No. 7 TS050, driven by Kamui Kobayashi, unable to get running again at racing speed, with the car eventually coming to a stop at the Porsche Curves. As Toyota’s hopes shifted to the No. 9 car it, too, suffered a failure that forced it to retire prematurely. In the case of that car, driven at the time by Nicolas Lapierre, a severe puncture sent it careening into the gravel. It briefly caught fire as he attempted to limp it back to the pits.

ALSO SEE: How 24 Hours of Le Mans is Different for Porsche Without Audi

With Toyota unable to exorcise the demons from last season, the Porsche 919 driven by Neel Jani, Andre Lotterer and Nick Tandy looked all but ready to cruise to the win. But an engine issue dashed that car’s hopes of finishing the gruelling race, with Lotterer unable to do anything but watch as the engine wouldn’t restart.

That left Porsche’s hopes in the No. 2 car, this despite early driveline issues that forced it into the garage after just a few short hours of racing. However, its return to action proved invaluable after the retirement of its sister car, with the trio of Timo Bernhard, Earl Bamber and Brendon Hartley chasing down some impressive LMP2 cars to earn the overall win.

Porsche-at-Le-Mans-SUPPLIED-671x411

Lots of Excitement Elsewhere

The excitement of this year’s race wasn’t limited to LMP1, with plenty of action elsewhere, starting with the hotly contested LMP2 class. The busiest of the four groups, with 25 entries, the LMP2 cars showed impressive speed and agility, with with plenty of jockeying for position from start to finish. In the end it was the No. 38 Jackie Chan DC Racing car that, while unable to hold onto the overall lead, claimed the top spot in its class as well as a second-place finish overall. The No. 13 Vaillante Rebellion Racing car finished second in LMP2 and third overall, rounding out the podium.

Both the GTE Pro and GTE Am classes were equally as ruthless, with entries from Aston Martin, Ferrari, Ford, Chevrolet and Porsche dicing it up for the lead before the No. 97 Aston Martin Racing Vantage took top honors in the former, and the No. 84 JMW Motorsport Ferrari 488 GTE in the latter. The GT cars didn’t receive quite the same amount of attention as their prototype counterparts, but that doesn’t mean either class was any less competitive. Wheel-to-wheel action was strewn throughout the race, with Aston Martin’s early lead in the GTE Pro class sticking around until an extended pit stop allowed both a Porsche 911 RSR and Chevrolet Corvette C7.R to squeak by. In the end, Aston Martin was able to strike back in the GTE Pro class, finishing first followed by the No. 63 Corvette Racing Corvette C7.R and the No. 67 Ford Chip Ganassi Racing Ford GT, respectively. GTE Am saw its Top 3 swept by Ferrari 488 GTEs, with the No. 84 JMW Motorsport car followed by the No. 55 Spirit of Race and No. 62 Scuderia Corsa, respectively.