MARTINSVILLE, Va. — Dale Earnhardt Jr. earned his fourth win of the season on Sunday at Martinsville Speedway in an emotional victory a week after he was eliminated from the Chase for the Sprint Cup championship.

Jeff Gordon was second in the Goody’s Headache Relief Shot 500, giving Hendrick Motorsports a 1-2 finish on the 10-year anniversary weekend of the fatal plane crash that killed 10 people on their way to the speedway. Lost on that day were team owner Rick Hendrick’s son, brother, twin nieces, the team general manger, head engine builder, a key sponsor representative, two Hendrick pilots and a pilot for Tony Stewart.

“This means so much to all of us,” Earnhardt said. “I lost my daddy a long time ago and I know how hard that is. I can’t imagine losing the amount of people Rick lost. My heart goes out to him during this weekend. This honors them.”

Gordon was the highest finishing Chase driver. Without a Chase driver in Victory Lane, no driver clinched an automatic berth in the Nov. 16 championship finale at Homestead.

“That means so much to Hendrick Motorsports,” Gordon said. “That’s the best way you can possibly pay tribute to those that we lost 10 years ago. To have a 1-2 finish, that’s pretty awesome. I would have loved to have gotten that win to move on to Homestead, but this is certainly a great start for us.”

Running fifth, Stewart gambled and stayed on the track after the race was red-flagged with 10 laps left. Earnhardt and Gordon pitted for fresh tires, and that one final stop was just enough for the successful finish.

“If we had to do that 100 times over, we’d do the same thing,” Stewart said. “We didn’t have anything to lose. It was worth the gamble.

Harvick crashed just past the halfway point when he had contact with Kenseth following a restart. It made for a mixed day for Stewart-Haas Racing: Team co-owner Stewart scored his first top-five finish since March, but Harvick’s championship chances took a huge hit.

Harvick had to take his car to the garage, where crew members from all of SHR’s teams worked furiously to repair the damage and get him back on the track. Even competition director Greg Zipadelli was working on the Chevrolet, which received significant repairs before Harvick returned to the race, down 40 laps.

“Yeah, he won’t win this championship,” Harvick said of Kenseth. “If we don’t, he won’t.”

Kenseth called the race “one of the lowlights of my career,” and said he understood Harvick’s frustration.

“I don’t blame him for feeling like that, to be honest with you. It was a mistake,” Kenseth said. “He was an innocent bystander, at the wrong place at the wrong time. I totally understand how he feels, I totally understand why he would say that, I totally get it.

“He knows it’s a mistake, too, but that doesn’t really help him. I don’t blame him. He got taken out of the race for being at the wrong place at the wrong time.”

Harvick likely needs to win at either Texas Motor Speedway next week or Phoenix International Raceway — where he’s a five-time winner — to advance to the finale.

Same for Keselowski, who overcame an early speeding penalty to be in the hunt until a mechanical problem in his Ford caused a multi-car crash that involved Edwards with 64 laps left and forced a red flag.

Keselowski just climbed out of a similar hole a week ago — he had to win at Talladega to advance into this round of the Chase.

“It’s been tough but it builds character and makes us stronger,” Keselowski said. “With this format, we’re by no means out.”

Another accident led to a second red flag with 10 laps left that lasted for nearly 10 minutes. Earnhardt and Gordon lined up 1-2 and instantly took off for pit road when the action resumed. Stewart stayed out, but was passed by Earnhardt for the lead with four laps remaining.

Earnhardt got the win he needed a week late and is simply running for trophies down the stretch instead of a championship.

“We tried to win here so many years,” he said. “This place is so special to me. I wanted to win here so bad. We’ve brought some good cars.”

The race had its usual dose of revenge as Brian Vickers and Kasey Kahne took turns retaliating against each other until NASCAR told them to knock it off.

The warning came after Kahne had spun Vickers, who then told his crew: “Alright, we owe him another. We can do this all day long.”

Both drivers were then relayed the message from NASCAR, to which Kahne crew chief Kenny Francis said “The ball was in (Vickers’) court.”

Eight-time Martinsville winner Jimmie Johnson, who was eliminated from the Chase last week, finished 32nd.