DAYTONA BEACH, Fla. -- Justin Haley started last and crossed the finish line first.
It would have been a stellar run in just his second Xfinity Series race -- if only he could have kept two tires above the double-yellow line at Daytona International Speedway.
Kyle Larson was declared the winner of the Firecracker 250 on Friday night when Haley's late pass in overtime was ruled illegal.
A full-time driver in the Trucks series, Haley used an aggressive and impressive move to complete a stunning pass that looked as if it would lead him to Victory Lane. But Haley inadvertently crossed the yellow line around the inside of the famed track, and NASCAR ruled it improper.
He finished 18th.
"In the moment, you really don't think about [the rule]," said Haley, who didn't know he had been penalized until after he did a celebratory burnout. "I wasn't on the apron. That's how I always took it. Oh, well.
"It was definitely high to low [of emotion]. It was just an opportunity to come out here. I'm just extremely blessed. ... It was a pretty B.S. call, but it's NASCAR and you can't reverse it."
The rule states that a vehicle can't go beneath the double-yellow line "to improve its position" and that it is considered below the yellow line when the left-side wheels are beneath the left line.
NASCAR Xfinity Series director Wayne Auton said it was clear the left tires were beneath the line and that even if Haley had a nose ahead of the other cars when he went below, it was in the act of improving his position, and therefore he was penalized to the last car on the lead lap.
The rule is designed for safety reasons to keep drivers from ducking on the apron and then trying to squeeze back into a line in the draft.
Auton said the officials looked at video to make sure it was the right call and to determine whether Larson or Elliott Sadler got to the finish line first.
"None of us want to make that call, but we've also asked the drivers that if you think you are putting yourself in that position, throttle back and don't advance your position," Auton said. "But the 24 [of Haley] did coming to the checkered flag tonight.
"It definitely is the right call per the rule book."
The win gave Cup series regular Larson three wins in four starts this year in the second-tier series.
"It's amazing,'' Larson said. "I've been close to win an Xfinity race here in Daytona, so it's nice to finally get it done.''
It was another heartbreaking loss for Sadler, who finished second at Daytona for the third straight time.
"I felt like I was in a good spot there at the end beside Larson,'' Sadler said. "It just wasn't meant to be.''
The race was slightly calmer than the Xfinity opener at Daytona in February. That one had four cautions in overtime before Tyler Reddick edged Sadler at the line in the closest finish in NASCAR national series history.
"I felt like it was Daytona in February all over again,'' Sadler said.
Austin Cindric, running in the third position, flipped after a hard crash that brought out a red flag with 18 laps to go.
Matt Tifft started the big wreck when he tapped Cindric from behind and sent him spinning across the track. Cindric hit several others before turning onto two wheels and then flipping twice. Ryan Truex and Reddick were among those also involved.
Cindric was evaluated and released from the infield care center without any injuries.
"Definitely the biggest wreck I've ever had,'' said Cindric, the son of Team Penske president Tim Cindric.
Cup series regular and fan favorite Chase Elliott broke an oil pump belt, ending his night with 10 laps remaining.
ESPN's Bob Pockrass and The Associated Press contributed to this report.