Updated

FORT WORTH, Texas (AP) Carl Edwards got the victory he desperately needed to earn a championship-contending spot in the NASCAR Sprint Cup finale, winning at Texas on Sunday night in a race shortened by 41 laps because of rain after the start was delayed nearly six hours.

With his fourth career win at Texas, Edwards joined Jimmie Johnson as drivers locked into the championship-contending spots in Homestead.

That leaves two spots up for grabs next Sunday at Phoenix.

Edwards entered the second-to-last race before the Nov. 20 season finale eighth in points among the drivers still eligible for the championship.

''This is huge. I don't think it's sunk in yet. That's all we said was needed, just a shot,'' Edwards said. ''Now we're going to go to Homestead, we're going to do what we need to do. This was a great test. We came here and did what we needed to do, we performed, and I really believe we can do that at Homestead.''

The rain-shortened victory was certainly appropriate for Edwards after how his championship Chase ended last year.

Last year's race at Phoenix was delayed nearly seven hours as a series of storms passed through the area, and then once it started under the lights was called after 218 laps. Edwards finished fifth, leaving him five points out of the final spot for the Chase finale.

Edwards' three Joe Gibbs Racing teammates are among the six other drivers still in contention this season, and clearly not all of them can advance.

Light rain had already been falling, and plenty more was on the radar around the track, when the caution came out with 45 laps remaining of the originally scheduled 334-lap race.

All the cars were brought to pit road four laps later, and it was only a few more minutes before NASCAR declared the race over and official after 293 laps. It could have taken two hours or more to dry to track.

''We were in a bad spot if we went green again,'' Edwards said. ''But the last run before it rained, I think we could have held off, I'm not sure.''

Edwards had taken the lead on lap 258 late Sunday after beating Martin Truex Jr. off pit road, and led the rest of the way.

It was Edwards' first win at Texas in eight years. He swept the two Cup races at the track in 2008, the season he had nine wins overall and finished second in season points. Three years later, Edwards was the season runner-up again even though he matched Tony Stewart for the most points. Stewart won the championship on a tiebreaker (his five wins to Edwards' one).

Joey Logano, another Chase contender, finished second while leading a race-high 178 laps. Truex finished third and Chase Elliott fourth.

Logano is third in season points, with Kyle Busch fourth. Matt Kenseth, Denny Hamlin, Kevin Harvick and Kurt Busch are in the fifth through eighth spots. If one of those six drivers don't win Phoenix, the final two championship spots would be determined by points.

Harvick got his track-record eighth win at Phoenix in March, and has won five of the last six races there.

''We've done it I don't know how many times,'' Harvick said. "We'll just go there and do what we always do and race as hard as we can.''

Some other things from Texas:

TRAILING AFTER GREEN: Polesitter Austin Dillon led only the race's first six laps, but didn't lead a green-flag lap. He was passed by Logano for the lead on lap 7, the first lap after the green flag.

BIG BOBBLEHEAD: The first 30,000 fans were given Tony Stewart bobbleheads commemorating the retiring Sprint Cup driver's final race at Texas. During driver introductions, track president Eddie Gossage presented Stewart with his own bobblehead - a life-sized replica with an oversized head.

HELD OUT: Matt DiBenedetto wasn't allowed to drive because of NASCAR's concussion protocol. He was involved in a hard crash in the Xfinity Series race Saturday, and wasn't cleared by doctors to drive in the Cup race even though he said he felt ''perfect'' on Sunday.

LOUD POP: A tire specialist for Richard Childress Racing was treated and released from the infield care center after a tire just taken off Paul Menard's car popped while being checked behind the wall.