Updated

Matt Kenseth won his second race in the Chase for the Sprint Cup championship by surviving Sunday's crash-filled Hollywood Casino 400 at the newly repaved Kansas Speedway.

In a race that featured a track and Sprint Cup Series season-record 14 cautions, mostly for accidents, Kenseth grabbed the lead for good with 49 laps remaining when he was the first off of pit road during a round of stops under caution. Martin Truex Jr. gained ground on Kenseth in the closing laps, but Kenseth held off Truex at the finish by 0.5 seconds.

It was Kenseth's third win in 2012, which will be his last year in the No. 17 Ford for Roush Fenway Racing. Next season, the 2003 Cup champion will move over to Joe Gibbs Racing to drive the No. 20 Toyota, which is currently occupied by Joey Logano.

"It really means a lot," said Kenseth, who has won 24 Sprint Cup races during his 14-year tenure at Roush Fenway. "I want to thank (team owner) Jack Roush, (former crew chief) Robbie Reiser and (former Roush teammate) Mark Martin. Without those guys, I would have never been at Roush Fenway Racing."

Kenseth had an encounter with the outside wall when, after a restart on lap 173, Aric Almirola bumped into leader Mark Martin, causing Almirola to spin. Kenseth scraped the wall as he avoided being caught up in a wreck.

"I thought it was over when I got in the fence when Aric wrecked under Mark," Kenseth said. "I was watching them and trying to make sure I didn't hit them, and I flat-sided it pretty bad. It ended up working in our favor. They (No. 17 crew members) fixed the body as good as it was when we started, and we had to take less gas in that last pit stop, and this pit crew put me out front."

Jimmie Johnson almost had a setback in his bid to win the series championship when he crashed into the wall in turn four at the halfway point in this 400- mile race. Johnson, who won at Kansas one year ago, made multiple pit stops for repairs and then stormed back for a ninth-place finish, which was one spot behind points leader Brad Keselowski.

"(The car) is pretty tore up," Johnson said. "I'm definitely proud of this team and the fact that we never give up and continue to fight and try to get every point we can."

The point separation between Keselowski and Johnson remains at seven, as four races remain in the Chase -- Martinsville (next Sunday), Texas (Nov. 4), Phoenix (Nov. 11) and Homestead (Nov. 18).

"There was caution after caution, and it seemed like every wreck today seemed to happen in front of me," Keselowski said. "I'm glad to survive the carnage and brought back a decent car. It's in okay shape and dodged a bullet. That's the only way that I can describe it. Whew, just a tough day."

Denny Hamlin is 20 points out of the lead after finishing 13th, while Kansas- native Clint Bowyer, the winner of last weekend's race at Charlotte, is 25 markers behind following his sixth-place run. Kenseth moved up two spots to ninth in the Chase rankings (-55).

Paul Menard finished third, while Kasey Kahne, the pole sitter, and Tony Stewart rounded out the top-five. Stewart, the defending series champion, rebounded from an early-race pit-road speeding penalty and then a spin on the backstretch late in the event.

Regan Smith, substituting for Dale Earnhardt Jr. in the No. 88 Hendrick Motorsports Chevrolet for the second straight race, posted a seventh-place finish. Smith placed 38th at Charlotte after suffering engine failure in the early going there.

Prior to the start of this race, team owner Rick Hendrick said that Earnhardt Jr. would indeed return to the car for next weekend's race at Martinsville. Hendrick, though, later rescinded his pre-race comments that he had been cleared to drive. Earnhardt Jr., who missed Charlotte and Kansas due to two concussions he sustained within a six-week period, will be evaluated during a test session on Monday before he is medically cleared for Martinsville.

"I want to apologize to all you guys (the media)," Hendrick said. "I gave you a little bad information out on pit road today. I've been out here at the dealerships, and I did talk to the doctor (Dr. Jerry Petty, neurosurgeon) with Dale, and he said everything looked good and everything was fine.

"However, I didn't know until (Hendrick Motorsports public relations director) Jesse (Essex) informed me that I had gotten ahead of myself, and that there is a closed test Monday that Dr. Petty will attend. Dale will be back in the car (for that test), and he'll make the decision with a final test on Tuesday."

Earnhardt Jr., who is NASCAR's most popular driver, is one of the 12 drivers in this year's Chase field. He sustained his second concussion during a 25-car accident on the final lap of the Talladega race two weeks ago. His first one occurred during a crash while participating in the Aug. 29 Goodyear tire test at Kansas.

Danica Patrick was involved in a crash with Landon Cassill on lap 155. Both drivers made contact and spun around, with Patrick backing it into the wall. Patrick and Cassill also bumped into each other earlier in the race.

"I've just been really frustrated with the 83 (Cassill)," Patrick said. "He slammed into me on the frontstretch for no other reason than his radio communication, saying that she was in the way. I've always played fair, but it's one time that I can imagine frustration. It's been pretty consistent with him getting into me, so at some point and time, I have to stand up for myself."

Patrick finished 32nd. Texas and Phoenix are the remaining races on her Sprint Cup schedule this season. Patrick is expected to compete in the series full- time next year.