After coming so close to victory so often in recent weeks, Joey Logano finally sealed the deal on Sunday, winning the Cheez-It 355 at the Glen, the second and final road race of the NASCAR Sprint Cup Series season.

Kevin Harvick dominated the proceedings, leading a race-high 29 of 90 laps, only to see his No. 4 Stewart-Haas Racing Chevrolet run out of gas while out front on the last lap.

That allowed Logano to get past in the No. 22 Team Penske Ford and claim his second victory of the season and the 10th of his career. It was Logano's first victory since the season-opening Daytona 500.

Logano was followed to the checkered flag by the Joe Gibbs Racing Toyota of Kyle Busch.

Harvick wound up third, followed by Kyle's JGR teammate Matt Kenseth and Harvick's SHR teammate Kurt Busch.

"Coolest weekend of my life," said Logano, who came into Watkins Glen with top-five finishes in five of the previous seven races, but mounting frustration that he hadn't won any of them.

"Every driver wants to add a road-course victory to their resume," said Logano, who also won Saturday's NASCAR XFINITY Series race at the New York state road course. "It's really, really, really neat to be able to add this one."

Afterward, Harvick was philosophical.

"I thought I had done a pretty good job of saving fuel," said Harvick. "Really, I was just running as fast as I needed to protect the lead there. … We were in a position to have a win -- two corners away -- but that's just kind of how the middle of the season has gone."

Runner-up Kyle Busch drove conservatively, but his second-place finish moved him inside the top 30 in points. For the first time all season, the younger Busch is now eligible for the Chase for the NASCAR Sprint Cup.

"Man, I don't know," Busch said afterward. "I don't know what my emotions are. I'm just happy with this team and what these guys are doing."

It was an interesting day at the Watkins Glen International road course.

Last year's race winner, AJ Allmendinger, started on the pole, flanked by Martin Truex Jr. Soon, a three-car lead pack formed, with Allmendinger, Truex and Harvick about three seconds ahead of Kyle Busch by Lap 15.

On Lap 21, Truex and Harvick went by Allmendinger to take over the top two spots, with Allmendinger saying he burned the rear tires off his car.

On Lap 24, Greg Biffle had a flat left-front tire, which led to a caution two laps later for debris from his car. Brad Keselowski pitted before the yellow and was able to take the lead when the others pitted.

During a restart just past the midway point, Sam Hornish Jr. made a bad start, wadding up the field behind him and bringing out a red flag to allow track workers to clean massive amounts of fluid dropped on the frontstretch.

When the race resumed, Kyle Busch put pressure on Keselowski and muscled past him on Lap 56 to take the lead. The next lap, Tony Stewart stalled on the track to bring out another yellow.

Busch and most of the leaders pitted under the caution, which put Kenseth, Harvick and Truex out front. When the green came out on Lap 61, Harvick quickly passed Kenseth for the top spot.

On Lap 83, Logano took second away from Kenseth and set sail after Harvick, who didn't have enough fuel to go the distance. On the last lap, Logano made the race-winning pass when Harvick's tank ran dry at the end.

"Once I got to him, he picked it up," Logano said of Harvick. "You could tell he was saving fuel. And once I got close to him, he started going faster."

But in the end, Harvick didn't have enough gas and Logano got the trophy.

"Man, that was just the coolest win," said Logano.

VIDEO: Kyle Busch talks about his second-place finish that moves him into the top 30 in Sprint Cup points.