AVONDALE, Ariz. (AP) - Brian Scott got the caution he wanted, racing off to his first NASCAR trucks win in three years.
James Buescher got a bad break he didn't need, sending the series championship into what could be a wild finish next weekend.
Scott used a late pass on a restart with two laps left after Buescher hit the wall, winning win a wreck-filled race at Phoenix International Raceway Friday night that tightened up the season championship.
"Had it not been for the caution at the end, I don't think we could have done it," Scott said.
Buescher could have done without it.
He came into the race with a 15-point lead and appeared to be in position to pad it after Ty Dillon suffered damage from a wreck with about 40 laps left.
All Buescher had to do was hold on. His truck wouldn't let him.
Working his way back from a pit mishap with about 100 laps left - he slid into the wall in his stall - Buescher was running seventh when his right front tire went down, sending his No. 31 truck into the wall. His crew tried to repair the damage enough to get him back on the track, but couldn't do it.
Buescher finished 17th, leaving him 11 points ahead of Timothy Peters, who avoided the wrecks to finish fourth, and 12 ahead of Dillon. Joey Coulter, who finished third, is 29 points back.
Buescher heads into next weekend's season finale at Homestead needing to finish seventh or better without leading a lap, eighth with one lap led or ninth while leading the most laps.
Scott can't win the season championship, but he may have taken a big step toward landing a ride next season.
Driving the No. 18 Toyota that Kyle Busch won with at the last trucks race at PIR in February 2011, Scott was hoping for a caution late in the race to give him a shot at passing Kyle Larson.
He got it with three laps left, when Buescher slammed into the wall.
Scott beat Larson on the restart and held on over the final lap for his second career trucks victory - first since 2009 at Dover. He is the 15th different winner this season, a trucks series record.
Scott's timing was pretty good, too; his Nationwide deal with Joe Gibbs Racing ends next week.
"I'm on the market. I'm looking for something," Scott said. "I don't know whether it's going to be Nationwide, truck. I feel like I can still be competitive. The last two years have been rough."
PIR was repaved and reconfigured after Busch's 2011 win, and the trucks ran fast in qualifying, with Nelson Piquet Jr. earning the pole with a track-record 134.439 mph.
About 40 laps into the race, the track started to get slick and trucks started careening off the walls and each other, crashing six times in 40 laps - four on consecutive restarts.
Parker Kligerman had his championship hopes all but dashed in one of wrecks, getting loose out of a corner and slamming into two other trucks. Third in the points heading into the race, he finished 27th and is 37 points behind Buescher.
"To get loose and get into the wall, that's not very good driving," Kligerman said. "But we were just really loose all night."
Dillon got caught up later.
He started 21st, but moved up quickly, grabbing the lead after a string of crashes midway through the race.
Dillon's day took a bad turn when he was involved in a wreck with about 40 laps to go after German Quiroga hit Brendan Gaughan from behind.
Gaughan was infuriated by the wreck, immediately climbing out of his car and reaching into Quiroga's window as he screamed at the Mexican driver, pulling his helmet back at one point before storming off.
"The kid overdrove the corner - I watched the replay, he overdrove the corner - and he screwed up," said Gaughan, who finished 23rd. "It's pretty self-explanatory."
Dillon didn't suffer as much damage as the other drivers and managed to stay on the track, restarting 18th. He couldn't make up much ground, but grabbed a few spots at the end of the race to give himself a shot next weekend.
Peters did the same thing, taking a gamble by taking four tires when everyone stayed out during a caution with 90 laps left and avoiding all the wrecks.