Published: Sunday, October 28, 2012 at 9:13 p.m.

Last Modified: Sunday, October 28, 2012 at 9:15 p.m.

The five-time series champion raced to his seventh career victory on NASCAR’s trickiest oval Sunday, and the triumph helped him erase a seven-point deficit and supplant Brad Keselowski as the points leader with three events remaining.

But before handing Johnson the title, he cautioned, there’s plenty of racing yet to do.

“I’m ecstatic about the win today and ecstatic about the points lead, but this is no cake-walk,” Johnson said after the 59th victory of his career and fourth this season.

“These guys are bringing their best each and every week. ... The next two races will tell the tale. Anything can happen. We could both wad it up next week and Clint Bowyer is your champion.”

Johnson moved two points ahead of Keselowski, who finished sixth for his highest career showing at the track. The series next moves to Texas and Phoenix before finishing up at Homestead-Miami.

“I know this championship’s going to come down to Homestead,” Keselowski said. “You’ve just got to be in position to where you’ve got a shot at it and we’re doing the things it’s going to take.”

Both drivers needed only to look at Denny Hamlin’s day to be reminded that things can go south fast. Hamlin seemed poised to get in the thick of it, and then had an electrical problem that sent him to a 33rd place finish and out of contention.

“When these things happen, you’ve just got to suck it up and move on,” Hamlin said. “There’s nothing I can do about it. One of these days it’s going to be our time. It’s just not right now.”

Keselowski’s day was nowhere near as adventurous as Hamlin’s, but effective all the same.

He started 32nd, methodically worked his way forward, and was never really a factor until he took a late gamble to grab the lead — and a crucial bonus point. He was leading the race briefly when a caution flag flew and he and Dale Earnhardt Jr. opted to stay out, then watched as the other 16 lead-lap cars all headed for pit road for fresh tires.

“I think we’ve learned a lesson here in the past not pitting late, and that certainly came into play,” Johnson said. “I felt like it was going to be a problem for him. We’ve been there before and stayed out and got beat.”

When the race went back to green with 19 laps to go, Keselowski was a sitting duck whose best bet was to hang on for as long as he could and then avoid any Martinsville mayhem that cropped up in a furious dash to the finish.

He said the decision to stay out was his own, and he was shocked no one else followed.

“It’s at the end of the race and half the field had just pitted 20 or 30 laps ago,” Keselowski said. “If I was running 15th, I would have stayed out. I would have put ‘em in my shoes and said by golly, I would have stayed out. None of those guys did and I don’t know why. Well Dale (Earnhardt) Jr. did. He had some sense. It just wasn’t meant to be.”

Johnson, who led eight times for 193 laps, passed him on lap 487 on his way to making the race a bonus points bonanza. He got one for leading a lap, one for leading the most laps and three for the victory, wiping out a seven-point deficit.

On the final restart, Busch said he was trying to avoid spinning Johnson heading into turn one, but nudged him. Johnson slowed, and Busch too, and “when I went back to the gas, I spun my tires and got loose, and he squirted away from me.”

Bowyer also had a great car, leading 154 laps, and Gordon led 92.

While the championship race tightened at the top, it also eliminated Hamlin, who seemed poised to get in the thick of it, and then had an electrical problem that sent him to a 33rd-place finish and out of title contention.

Until the problems arose, Hamlin had put on a clinic about how to pass cars on the 0.526-mile oval.

“When these things happen, you’ve just got to suck it up and move on,” Hamlin said. “There’s nothing I can do about it. One of these days it’s going to be our time. It’s just not right now.”

After his first pit stop, Hamlin was penalized for entering pit road too fast, a penalty that moved him to the back of the lead lap, which was 31st. Immediately, he started quickly working his way forward.

After 200 laps, he was contending and actually left pit road with the lead, but again, he was penalized for speeding entering pit road, again dropping him to the back of the lead lap, this time 28th.

He again worked his way into the top five until his problems dropped him 34 laps behind.