AP photo by John Amis / Denny Hamlin does a burnout after winning the Southern 500, the opening race of the NASCAR Cup Series playoffs, on Sunday night at South Carolina's Darlington Raceway.

DARLINGTON, S.C. — Denny Hamlin shook off a difficult week in the best way possible: He ended his season-long winless drought with a victory at the Southern 500 to open the NASCAR Cup Series playoffs.

The week's problems included some personal matters and continued at the track Saturday when Hamlin was in line to win the Xfinity Series event at Darlington Raceway until a pit penalty dropped him back.

This time Hamlin had to hold off the season's top playoff seed, Kyle Larson, who closed to Hamlin's bumper racing to the finish line Sunday night.

"It's certainly significant," Hamlin said. "This one's big for us and our team and our momentum."

And it moved him into the second round, when then field will be trimmed from 16 drivers to 12, without having to scrape for points with close finishes as he did to qualify seventh for the playoffs this season.

"It wasn't a perfect night," said Chris Gabehart, Hamlin's crew chief. "It is hard to be perfect at the Southern 500. But it was good enough."

Hamlin entered Sunday seeded seventh in the 16-driver postseason field but had vowed that if he kept running strongly up front, he'd reach victory lane before the year ended.

"It's as good a time as any, right?" Hamlin said after Sunday's triumph. "My favorite race of the year."

He looked like a comfortable winner before the Larson charged up on his back bumper on the final turn, smoke pouring out of Hendrick Motorsports No. 5 Chevrolet. But Hamlin held firm up near the wall to take the checkered flag

"He was going to have to go through me," the 40-year-old Joe Gibbs Racing driver said.

Hamlin's personal life became a topic during the past week, when the mother of his two daughters seemed to use social media to end their relationship. Her Twitter account has since been deactivated.

Hamlin, when asked about any distractions, said: "I'm a professional and do my job the best I can, and today I thought we did as good as we could."

Hamlin came out second to teammate Martin Truex Jr. during a caution with 45 laps to go, then moved in front when Truex was penalized for going too fast in the pits. Hamlin broke out ahead of Larson on the restart 36 laps from the end.

The win was Hamlin's fourth at Darlington and came during a grueling race in which several playoff contenders struggled at the track "Too Tough To Tame."

The past two Cup Series champions, JGR's Kyle Busch in 2019 and Hendrick's Chase Elliott last year, were in the garage before the race ended. Busch slammed the wall — to the delight of large crowd back at Darlington — on the 125th lap and drove straight to his hauler, winding up 35th. Elliotts' race ended when he hit the wall on a three-wide run and left with a flat tire and brake problems 42 laps from the end. He finished 31st.

Larson was second for the third straight time racing at Darlington. He led the most laps, 156 out of 367, and made it crazy at the end.

"I didn't want to wreck him. I just wanted to get to his outside," Larson said. "He did a great job, not really making any mistakes on that last run."

Ross Chastain finished third, the only nonplayoff driver among the top eight.

Chastain ran among the playoff cars most of the night. He was asked what he needed to break through at Darlington.

"A better driver," he chuckled. "I can go fast, I just can't quite race with them."

Chastain will drive the No. 1 car for Trackhouse Racing in 2022.

Truex was fourth, followed by Kevin Harvick, Kurt Busch, Brad Keselowski and Joey Logano, Chris Buescher and Austin Dillon.

Plenty of drivers with high playoff hopes left Darlington with problems, including two-time series champion Busch.

Soon after the start of stage two, the fourth-seeded Busch was racing close with Austin Dillon when he hit the outside wall in turn two, slid into the inside wall and drove straight to garage. Busch even plowed through some safety cones as he left the track.

Busch blamed his Toyota Camry, dropping a couple of expletives about the bad run: "We were running terrible, and we got wrecked."

Earlier, Daytona 500 winner Mike McDowell hit the wall on the back stretch on lap 30 and was done for the day. McDowell came in seeded 13th and finished 37th — dead last.

William Byron, the eighth seed, couldn't avoid Hendrick teammate Alex Bowman early on after Bowman's No. 48 Chevy hit the wall. On the 199th lap, Byron slammed hard into the wall entering turn one and ended his run. Byron was 34th.

The playoffs continue Saturday night at Virginia's Richmond Raceway.