Denny Hamlin celebrates in victory lane Saturday night at Bristol Motor Speedway after earning his fourth NASCAR Cup Series win of the year.

BRISTOL, Tenn. — The winner climbed from his car and immediately apologized for denying an underdog his first NASCAR Cup Series victory.

The runner-up, in tears over his flirtation with the breakthrough win, was raucously embraced by the crowd for his oh-so-close performance.

Bristol Motor Speedway was a bizarre mix of emotions Saturday night after Denny Hamlin chased down Matt DiBenedetto to spoil a Saturday night upset. DiBenedetto learned earlier in the week that Leavine Family Racing won't bring him back for a second season, and he has no job lined up for 2020.

"I'm so sorry to Matt DiBenedetto, (crew chief) Mike Wheeler. I hate it. I know what a win would mean to that team," Hamlin said as soon as he exited his car. "But I've got to give 110%."

Hamlin was the first Toyota and Joe Gibbs Racing driver to start from pole position this season, but his race was a roller-coaster ride that began when his car was damaged when he bounced off Jimmie Johnson's Chevrolet. He later had a loose wheel, went down a lap and seemed out of contention for his second career victory at the 0.533-mile concrete oval.

At the same time, DiBenedetto was working his way toward the front and put his Toyota out front for a race-high 93 laps. He needed redemption — and a win would have put him in the playoffs, no less — but he again wound up victim to the JGR juggernaut. That organization has a logjam of talent, Leavine is a JGR partner and JGR needs DiBenedetto's seat next year to promote Christopher Bell from the second-tier Xfinity Series.

"I wanted it to bad," DiBenedetto said. "I'm sad. Congrats to Denny — raced hard, and I've been a fan of his since I was a kid. To be racing door to door with him at Bristol in front of a great group of fans, I'm trying not to get emotional but it's been a tough week and I just want to stick around and want to keep doing this for a long time to come. I am not done yet. Something is going to happen."

The crowd roared its support as DiBenedetto's interview was shown on the infield big screen.

Roughly 45 minutes later, DiBenedetto found Hamlin on the NBC Sports set and interrupted his interview. The two hugged, and Hamlin pulled DiBenedetto close and whispered into his ear for a long moment.

He remained apologetic for spoiling what would have been a defining moment for DiBenedetto, as well as Wheeler, Hamlin's former crew chief with whom he won a Daytona 500.

"It is the worst person possible to have to pass with eight to go. My history with Mike Wheeler Matt is a fantastic driver," Hamlin said. "I have no doubt he's going to land on his feet, something better, and if he doesn't, all you car owners are idiots. Someone with that much talent deserves to be racing for wins on a regular basis."

Hamlin and DiBenedetto raced side by side for several laps before Hamlin completed the decisive late pass and sealed his fourth victory of the season. DiBenedetto was a career-best second.

Hamlin got over his initial disappointment for DiBenedetto and praised his No. 11 team for its resilient race and the way he picked his way through traffic to reclaim the lead.

"Between my spotter and the crew chief, just stayed on me to not get anxious, just kind of take my time. I had plenty of time," Hamlin said. "I just worked him over, worked him over. I knew I didn't want to show him the bottom (lane) until I knew I could make the pass. I ran the top, ran the top, ran the top, got the position on the bottom and finished it.

"We had a great car that could move around. Came back from a couple laps down, and here we are."

DiBenedetto's fight to hang on to the victory was hampered when he encountered Ryan Newman, a driver trying to make the playoffs. Newman refused to give an inch as DiBenedetto tried to put him down a lap, and contact between their cars caused DiBenedetto's Toyota to tighten up as Hamlin closed the gap.

A DiBenedetto victory would have dramatically changed the playoff picture. There are two races remaining to set the 16-driver field and only nine drivers have locked in their spots. With seven spots open, a first-time winner would have grabbed a coveted berth.

Johnson has never missed the playoffs since the format began in 2004, but the seven-time series champion who drives for Hendrick Motorsports dropped to 18th in points after a disappointing night at Bristol. Clint Bowyer also dropped out of the top 16, but is only two points behind the final slot, now held by Stewart-Haas Racing teammate Daniel Suarez.

Brad Keselowski finished third in a Ford and was followed by JGR driver Kyle Busch, who came from 31st to finish fourth. He received thunderous boos during driver introductions, but the eight-time Bristol winner simply guzzled something from a red plastic cup and thanked the fans for coming.

Hendrick Motorsports' Chase Elliott was fifth and the highest-finishing Chevrolet. Kyle Larson was sixth, followed by Bowyer and Suarez, who moved ahead of Bowyer in the standings via stage points. Kurt Busch and Ryan Blaney rounded out the top 10.

The Cup Series is off next weekend and returns to competition Sept. 1 at Darlington Raceway. NBC Sports expects Dale Earnhardt Jr. back in the booth for that event after he skipped Bristol after a crash landing of his airplane Thursday near the track.