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, giving Hendrick Motorsports a 1-2 finish on the 10-year anniversary weekend of the fatal plane crash that killed owner Rick Hendrick’s son and nine others aboard.

“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 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.”

Chase driver Ryan Newman was third, and Tony Stewart finished fourth. Chase drivers Joey Logano and Matt Kenseth were fifth and sixth.

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.”

Other Chase driver results included: Denny Hamlin eighth, Carl Edwards 20th, Brad Keselowski 31st and Kevin Harvick 33rd.

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.”

Keselowski was in the hunt until he lost the transmission in the No. 2, causing a multi-car crash that involved Edwards with 64 laps left and forced a red flag.

“I really think it’s an axle,” Keselowski said over the radio. “It just started shaking off of turn 2 and then it kicked itself out of gear because it was shaking so hard.”

The second red flag of the race came out with 10 laps and lasted for nearly 10 minutes. Earnhardt and Gordon lined up 1-2 and instantly took off for pit road when the green flag dropped with five laps left.

Keselowski really struggled early in the race and was running in the 20s, but he had picked his way through traffic and made up some good ground when Kasey Kahne spun Brian Vickers to bring out a caution. Most of the field pitted and Keselowski exited pit road in 14th — but was flagged for speeding.

The penalty dropped him to 23rd on the restart, and team owner Roger Penske encouraged his driver over the radio to be patient.

“The car looked real good, so let’s just bide our time here,” Penske radioed.

On the next caution, both Gordon and Newman were penalized for speeding. It hurt Gordon at the time — he had left pit road as the leader.

“Yeah, I knew we were. Big mistake on my part. I apologize,” he radioed.

But the focus quickly turned to Harvick, who wrecked just past the halfway point when he was hit from behind by Kenseth. He had to take his car to the garage, where crew members from all of Stewart-Haas Racing 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.”

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

The race had its usual dose of revenge as Vickers and 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.