Updated

Kevin Harvick claimed his fourth win of the season and earned the second seed in the championship Chase, while Dale Earnhardt Jr. finished 16th to clinch a spot in the playoffs for the first time in three years in Saturday night's Wonderful Pistachios 400 at Richmond International Raceway.

Harvick led 202 of 400 laps but had his hands full in the closing laps of the race. Jeff Gordon held the lead when the track-record 15th caution came for an incident involving Paul Menard. Harvick reclaimed the top position when he beat Gordon out of the pits with 16 laps remaining. He then held off a hard- charging Carl Edwards at the finish by just 0.14 seconds.

"It was just a great night," said Harvick, who captured his 18th career Sprint Cup Series win, including his second at Richmond. "The guys did a great job on pit road getting me out. We had a good car, and we were able to capitalize at the end."

Nine drivers -- Jimmie Johnson, Kyle Busch, Edwards, Matt Kenseth, Gordon, Harvick, Kurt Busch, Ryan Newman and Brad Keselowski -- had already clinched a position in the 12-driver Chase field prior to the 400-lap race at Richmond.

Busch and Harvick enter next Sunday's first Chase race at Chicagoland Speedway with 2,012 points each. However, Busch secured the top seed due to his four wins and ending the regular season higher in points than Harvick.

Busch experienced a loose tire early in the race, which forced him to pit unexpectedly and put him deep in the field. He rallied for a sixth-place finish.

"It was a hard-fought battle tonight, and we certainly had to battle through more adversity than we would have liked to, but that's what is going to make us better and stronger," he said.

Edwards finished second, followed by Gordon, David Ragan and Kurt Busch.

"I needed one more lap," Edwards said. "I went down that last corner and thought I would get to him and move him out of the way. I just couldn't. He was faster than I thought."

Tony Stewart and Denny Hamlin joined Earnhardt Jr. as those driver who locked down the remaining Chase positions. Stewart clinched the ninth seed with his seventh-place run.

"I wouldn't have predicted it halfway through the year with the way our season was going, but real appreciative our guys have kept their heads up and kept working really hard," Stewart said.

Earnhardt Jr. was involved in a 13-car incident that occurred within the first 10 laps. Clint Bowyer, a Chase hopeful, spun around after he and pole sitter David Reutimann made contact. The wreck triggered a chain reaction, with Earnhardt Jr. and Hamlin suffering slight damage to their cars.

Earnhardt Jr. will start the Chase in the tenth spot. He missed the playoffs in 2009 and '10.

"I'm proud to be in the Chase," he said. "I feel like I'm a good enough driver to be in the Chase, and my team is good enough to be there."

Hamlin, who hails from nearby Chesterfield, VA, also rebounded with a ninth- place finish at his home track. He earned the second and final wild card position based on his win in June at Michigan.

"There's only one place to go from where we're at right now, and that's forward," he said. "We're very fortunate to be here, with the tough season that we've had, and the ups and downs and the DNFs and what not. It's kind of a second lease on life for us and our season."

Keselowski, who finished 12th, concluded the regular season 11th in the rankings, but his three wins this year gave him the first wild card spot.

"We would have much rather preferred to have capitalized on the wins and get in the top-10, but we gave it a good effort," he said.

Seeded third through eighth in the Chase are: Gordon (2009 points), Kenseth (2006), Edwards (2003), Johnson (2003), Kurt Busch (2003) and Newman (2003). Johnson is attempting to win his record-extending sixth straight Sprint Cup championship.