Dale Earnhardt Jr emerged in front through the late strategy gambles and restart jostles to win at Pocono for the second time in the 2014 NASCAR Sprint Cup season.
Pitting for fresh tyres and a fuel top-up under a long yellow for a 13-car pile-up going into the final quarter of the race was key to Earnhardt's victory, as it meant his subsequent final stop under green could just be a rapid splash while others needed a full service.
The Hendrick Chevrolet driver still had to clear a gaggle of cars that were gambling on stretching their fuel loads to the finish, but a handful of late yellows helped that process.
After the final restart with three laps to go, Earnhardt just had to hold off a very determined Kevin Harvick, whose pit tactics brought him back up to second despite a pit speeding penalty and damage from the multi-car collision.
Harvick tried his utmost, but crossed the line two tenths of a second behind the triumphant Earnhardt, with early race leader Joey Logano right behind both of them.
Jeff Gordon had dominated much of the race, although the wild variety of strategies that developed from the first yellow onwards meant sheer speed was always unlikely to be enough.
Unlike team-mate Earnhardt, Gordon had to take a full fuel load and four tyres under green at his final stop, leaving him back in the pack, where his Chevrolet didn't handle so well. He could only make it back to sixth, behind Clint Bowyer and fuel-gambler Greg Biffle.
Kurt Busch was the other main protagonist, going out of sequence on fuel strategy early on but showing similar speed to Gordon. He also ended up in the midfield after the final stops, and then hit the wall when a tyre went down.
Denny Hamlin inadvertently triggered the race's huge crash when he got sideways in a big group of cars following a brush with Bowyer. While chaos erupted behind him, Hamlin was able to straighten up with just a small brush of the wall and finished ninth.
Brad Keselowski, Tony Stewart and Matt Kenseth were among the big names embroiled in the shunt, Stewart ending up perched atop Paul Menard's car.
Keselowski had earlier tumbled down the order from third on the grid when an opening-lap clash with Busch sent him sideways.
Jimmie Johnson had two punctures. He fought back from a lapped 43rd to fourth following the first, but the second ended his race.
Kyle Busch was another notable retirement due to an early engine failure.
Polesitter Kyle Larson steadily slipped back after losing the lead to Logano on lap one. He eventually finished 11th.
Results - 160 laps:
Pos Driver Team/Car Time/Gap
1. Dale Earnhardt Jr Hendrick Chevrolet 3h08m22s
2. Kevin Harvick Stewart-Haas Chevrolet +0.228s
3. Joey Logano Penske Ford +0.493s
4. Clint Bowyer Waltrip Toyota +2.195s
5. Greg Biffle Roush Fenway Ford +2.861s
6. Jeff Gordon Hendrick Chevrolet +2.869s
7. Jamie McMurray Ganassi Chevrolet +3.033s
8. Ryan Newman Childress Chevrolet +3.409s
9. Denny Hamlin Joe Gibbs Toyota +3.696s
10. Kasey Kahne Hendrick Chevrolet +4.329s
11. Kyle Larson Ganassi Chevrolet +5.513s
12. Casey Mears Germain Chevrolet +6.255s
13. Kurt Busch Stewart-Haas Chevrolet +6.369s
14. Marcos Ambrose Petty Ford +7.218s
15. Austin Dillon Childress Chevrolet +7.256s
16. Justin Allgaier Hscott Chevrolet +8.033s
17. David Gilliland Front Row Ford +10.428s
18. Ricky Stenhouse Jr Roush Fenway Ford -1 lap
19. David Ragan Front Row Ford -1 lap
20. Ryan Truex BK Toyota -1 lap
21. Cole Whitt BK Toyota -1 lap
22. Michael Annett Baldwin Chevrolet -1 lap
23. Brad Keselowski Penske Ford -1 lap
24. Josh Wise Parsons Chevrolet -1 lap
25. Travis Kvapil FAS Lane Ford -2 laps
26. Dave Blaney Humphrey Ford -2 laps
27. Reed Sorenson Baldwin Chevrolet -2 laps
28. Alex Kennedy Circle Sport Chevrolet -2 laps
29. Carl Edwards Roush Fenway Ford -3 laps
30. Danica Patrick Stewart-Haas Chevrolet -4 laps
31. Alex Bowman BK Toyota -6 laps
32. Martin Truex Jr Furniture Row Ford -16 laps
33. Paul Menard Childress Chevrolet -17 laps
AJ Allmendinger JTG Daugherty Chevrolet 137 laps
Aric Almirola Petty Ford 125 laps
Tony Stewart Stewart-Haas Chevrolet 124 laps
Brian Vickers Waltrip Toyota 116 laps
Matt Kenseth Joe Gibbs Toyota 116 laps
Jimmie Johnson Hendrick Chevrolet 111 laps
Joe Nemechek NEMCO Toyota 88 laps
Landon Cassill Hillman Chevrolet 28 laps
Kyle Busch Joe Gibbs Toyota 23 laps
Johnny Sauter BK Toyota 11 laps