DARLINGTON, S.C. – Kevin Harvick capped his biggest weekend at Darlington Raceway with his first Southern 500 victory Saturday night, passing Dale Earnhardt Jr. two laps from the end of the longest race in the track's 65-year NASCAR history.

Harvick earned his first pole here Friday night and had the most dominant car. But he had to make it through a restart with 10 laps left and two tries at a green-white-checkered finish — NASCAR's version of extra innings.

"We were able to hang on there at the end and I knew I had that high line I hadn't showed it to them all night on the restarts and I wanted to save it until the very end," Harvick said.

Earnhardt finished second, his best career showing at a track where his late father won nine times. Jimmie Johnson was third, last year's Southern 500 winner Matt Kenseth fourth and Greg Biffle fifth.

Harvick led 239 of 374 laps and became the first two-time winner in the first eight races of the season.

Harvick had just three top-fives and six top-10 finishes in 17 career Darlington races before this. He hadn't finished better than fifth in his last 10 tries.

He was cruising along with 10 laps left when Joey Logano's car leaked fluids on the track. Johnson and Earnhardt took just two tires in the pits and sneaked out ahead of Harvick, who had taken four tires and restarted fifth.

Earnhardt quickly moved past Johnson for the lead until Denny Hamlin hit the wall for the 10th caution, setting up the overtime finish.

Earnhardt was still out front on that restart when Clint Bowyer got too close to Kurt Busch and spun him out — Busch made sure to walk up the track and stare down Bowyer — to force a second green-white-checkered finish.

This time, Harvick and his fresher tires easily got past Earnhardt and drove on to his second win since joining Stewart-Haas Racing this offseason, adding Darlington to his win in Phoenix this year.

Kyle Busch was sixth and points leader Jeff Gordon seventh.

Rookie Kyle Larson was eighth with Tony Stewart and Ryan Newman rounding out the top 10.

But there were plenty of powerhouse drivers who hadn't yet broken through — the three Hendrick stalwarts in Gordon, Johnson and Kahne among them — and that made for a frantic finish.