Mark Martin was just trying to finish. He ended up in Victory Lane.

With the laps winding down in Sunday's NASCAR Sprint Cup race at Michigan International Speedway, Martin and most of the other drivers in the LifeLock 400 were simply hoping to conserve enough gas to get to the end of the 200-lap event.

"I always, always come up short in those gas things," Martin said. "I'm probably about two and 25 in these things."

Make that 3 for 25 now.

It wasn't an easy day for the 50-year-old driver.

Martin has run well this season but had plenty of bad luck. It looked like more of the same Sunday when the battery in his No. 5 Hendrick Motorsports Chevrolet began to fail before the halfway mark.

Martin turned off everything in the car that he could, nursing it as best he could. Then he realized the race was going to be a fuel-economy run.

He saved just enough gas to hang on for his third victory of the season and the 38th of his Cup career.

He said crew chief Alan Gustafson told him he could race hard for about 10 laps after the last pit stop, but Martin said he began to conserve fuel after two or three.

"It was important we finish this race," Martin said. "If we were in the top five in points, we'd have run out today because I'd have gone for it.

"The battery had been going dead since lap 75 and I turned off all the fans and stuff," he added. "I turned (the engine) off after we crossed the finish line and coasted all the way around. Then I tried to start it up to drive it to Victory Lane and it wouldn't even turn over. It ran exactly as far as it was going to run."

Jimmie Johnson dominated most of the race and took the lead from Greg Biffle six laps from the end as Martin watched the duel from third place.

The three-time reigning Cup champion ran out of gas two laps from the finish, giving the lead to Biffle. But Biffle also ran out of gas as the final trip around the 2-mile oval began, clearing the way for Martin to drive to the front.

His car also was left with an empty tank on the last lap, but Martin was able to coast to the finish almost 3 seconds ahead of runner-up Jeff Gordon.

"My car was good, but I couldn't run their pace and save gas," Martin said. "When Jimmie ran out, I said, 'Heck, we're this close. I'm going to run hard. With three quarters of a lap , what can happen?'"

Denny Hamlin finished third, followed by Carl Edwards, Biffle, Juan Pablo Montoya and series points leader Tony Stewart. Last year's winner, Dale Earnhardt Jr., finished 14th.

Brian Vickers started from the pole, but Kyle Busch passed him at the start and led the first eight laps with Johnson moving into second.

Johnson swept past to take the lead on the ninth lap and looked unbeatable, leading 141 of the next 142 laps. He was never challenged, building big leads after each caution flag bunched up the field.

But Biffle and Hamlin both came out ahead of Johnson when the leaders pitted under caution on lap 154.

At that point, all the leaders were being told to conserve fuel.

Johnson got past Hamlin to take the runner-up spot on lap 179, trailing Biffle by 1.7 seconds. He steadily ate into that lead and finally was right behind the leader on lap 193.

The two were briefly side-by-side _ using more gas _ on lap 194 and Johnson managed to get past the next time around. Biffle immediately sped up and tried to repass Johnson _ again causing both to use more gas _ with Johnson remaining ahead.

"The 48 came up there and ran like we weren't on a fuel-economy run," Biffle said. "I messed with him a little bit. ... Unfortunately, he came up there and we cat-and-moused and used up too much gas."

Johnson, who led 145 laps, managed to get his car to the finish but wound up 22nd, the last car on the lead lap.

Martin drove only partial schedules the past few seasons. He joined Rick Hendrick's elite team this year for the full season and is making the most of it. The latest victory for the four-time series runner-up moved him from 13th _ outside the 12-man field for the Chase _ to eighth with 11 races remaining until the postseason begins.

Gordon, a teammate of Martin, Johnson and Earnhardt, went to Victory Lane to congratulate Martin.

"I said, 'Old man, you snookered us again.' ... He's like a 21-year-old with a lot of experience under his belt, and that's tough to beat."