Carl Edwards passed Brad Keselowski with just a few laps remaining and held on to win the Bojangles Southern 500 in Darlington, South Carolina on Sunday night.

The victory was Edwards’ second checkered flag of 2015; he won the Coca Cola 600 in May.

With just 12 laps left in the grueling 500-mile NASCAR Sprint Cup Series event, Edwards zipped by Keselowski coming off pit road and held on for his first Southern 500 victory. Sunday night’s race was marred by a track-record 18 cautions and didn’t end until just before midnight Eastern time.

Keselowski finished second, with Denny Hamlin in third. Joey Logano placed fourth. Kevin Harvick finished fifth.

The NASCAR Sprint Cup Series heads to Richmond next Saturday night for the final race before the start of the circuit’s 16-driver Chase playoff series Sept. 20 in Chicago.