It's becoming a rule of thumb that it's best not to leave a NASCAR race early at Auto Club Speedway. Not even with just two laps left.
For the third time in as many years, the Sprint Cup Series race in Fontana was settled either on the last lap or in an overtime finish.
It was the only lap Keselowski's No. 2 Ford led all day but the one that gave the 2012 Cup champion his first win of the season and his first victory at the two-mile Fontana oval.
Kyle Busch won the previous two races at Fontana in late fashion as well, first with a last-lap pass in 2013 and then in overtime last year. Busch currently is sidelined after breaking his leg in a racing crash last month.
Kevin Harvick, the reigning Cup champion who was seeking a Western sweep after winning the previous two races at Las Vegas and Phoenix, finished second Sunday in his No. 4 Chevrolet.
His teammate Kurt Busch, Kyle's older brother who started from the pole after recently coming off a NASCAR-imposed suspension, finished third in his No. 41 Chevy after appearing to have won the race twice.
Acknowledging that "the [Nos.] 4 and the 41 had been the entire class of the weekend," Keselowski said he "kind of stole one today."
"You can't give up and you've got to keep working on your car and your day," he said.
Keselowski also noted his team owner, Roger Penske, built Auto Club Speedway in the mid-1990s and "I just won at one of Roger's tracks. That's really cool."
Busch was leading with two laps left in the regulation 200 laps when the yellow caution flag came out for debris on the track.
That set up the first overtime, or "green-white-checkered" finish, and Busch again took the lead. But the caution flag flew again because the rear bumper panel on Kyle Larson's No. 42 Chevrolet flew onto the track after contact with another car.
That set up the second overtime finish. Busch, who had taken two fresh tires on his final pit stop, again took the lead. But as they entered the second and final lap, Keselowski — who had taken four tires on his stop — moved past Busch.
Behind them, Greg Biffle spun out. But NASCAR opted not to throw another yellow flag and let Keselowski and Busch race to the finish line.
"That last restart I just didn't get the job done," Busch said. "We didn't need that extra yellow at the end and I just got out-muscled by Keselowski. We had two [new] tires; Keselowski had four."
Keselowski's win means he's assured a berth in NASCAR's Chase for the Cup playoff in the fall as he seeks a second title.
"Having both cars in the Chase is exceptional," Penske said. "The drive that Brad did was amazing."
Keselowski, 31, said at the end of the race, "We caught some breaks and made the most of the breaks we caught. We were just able to find our way through the lanes and get to the front.
"This is one we're going to sit back and go, 'Wow,' for a while," he said.
Harvick, meanwhile, extended his remarkable run going back to last fall when he won his title.
It was the eighth consecutive race Harvick has finished first or second in a Cup race. That's the longest such streak since seven-time champion Richard Petty achieved the feat in 11 consecutive races in 1975.
"I'm not disappointed at all" with finishing second, Harvick said. "I'm just glad to be a part of such a good race."
Hamlin finished 28th after a late penalty and Kenseth finished 31st after his No. 20 Toyota broke an axle while leaving pit road.