DAYTONA BEACH | The only regret for Denny Hamlin Sunday at the Daytona International Speedway was that he forgot to record the Daytona 500. He was hoping a re-run would show how he beat Martin Truex Jr. by inches in a photo finish.

"I don't remember it honestly," he said after giving car owner Joe Gibbs his first 500 victory since 1993. "I don't know what happened. I can't even figure out what I did, but it all just came together."

The last thing Hamlin remembered was going down the backstretch in fourth place on the final lap. He saw Kevin Harvick making a big charge against the outside wall, so he pulled over to block him to provide cover for his teammate, race leader Matt Kenseth.

That's when it all became a blur.

Harvick maintained his attack eventually pushing Hamlin to Kenseth's back bumper and that's when Martin Truex Jr. dropped to the inside to make his own run for the victory.

Hamlin went to the middle.

Truex stayed low.

Kenseth lost his momentum after nearly hitting the wall and limped to a 14th-place finish.

After that, Hamlin and Truex ran side-by-side for the final half-mile until Hamlin finally surged ahead in the final 20 feet to win by less than six inches.

Neither driver knew who won. Both tried to see one of the scoring pylons or big screen televisions for an answer.

Replays offered proof: Hamlin by a nose. Officially, one-hundredth of a second for the closest finish in 500 history.

"You want to win the tight ones," the winner said. "That's what makes them special. It wouldn't be fun - well it would be fun to win by a lap. But it's, like, storybook. You make a pass on the last corner of the last lap of the Daytona 500. That's what makes it so cool."

"You'd rather get beat by a few feet than four inches, absolutely," Truex said.

The Toyota tandem of JGR cars for Hamlin, Kenseth, Carl Edwards and Kyle Busch and Truex from Furniture Row Racing spent most of the race at the front. In the closing laps, it became increasingly probable one of them was going to win. So when Harvick tried to get his Chevrolet in the middle of it, Hamlin got in his way.

Although a Chevrolet actually propelled Hamlin to the win, counting Busch's third-place finish, it wound up being the top-three sweep many expected.

Hamlin insisted he had no plans trying to go from fourth-to-the lead on the final lap.

"I mean, I'm sitting there and I'm thinking at three to go, if it wasn't my teammates, I'd be making a move right now," Hamlin said. "Two to go, if it wasn't my teammates, I'd make a move right now.

"I can't sit here and preach about teamwork through text messaging to all the crew chiefs and the drivers, 'Hey, guys, stick together, stick together.' You can't do that and then at the last minute screw it all up and somebody else win the race.

"I can assure you and promise to God to you that my plan was to block that 4 car [Harvick] from getting to the front three. He was coming with such a huge head of steam, he was going to get at least beside the 78 [Truex]. There was no question in my mind about that. After that, it was going to be a crapshoot."

Truex could have forced Hamlin wide coming down the stretch, but he thought he had enough momentum to win without taking any chances.

He miscalculated by a few inches.

"Wish I would have crowded him up the track a little bit more late down the frontstretch," Truex said. "Those are split-second decisions. He came out on the right end of it today.

"I feel like we were in really good position just doing what we did. Circumstances didn't work out quite as well as they should have. I could have done a little bit different coming to the line. I felt like I should have run Denny up the track a little bit, but I didn't."

Finishing behind Busch in third and Harvick in fourth was JGR's Edwards. Joey Logano was sixth followed by Kyle Larson, Regan Smith, Austin Dillon and Kurt Busch in 10th.

Kenseth was shocked to be less than a mile away from winning and falling back to 14th, especially since the lead car generally has the advantage on the final lap.

"They don't get more crushing than that," he said. "That definitely was position I wanted to be in. I saw Denny had the run. Safe bet was to stay on the bottom and finish second. But this is the Daytona 500."

Pre-race favorite Dale Earnhardt Jr. was surprised by how badly his car handled in traffic - and even more surprised when it snapped out of control and into the infield wall on Lap 169.

Pole winner Chase Elliott lost control of his car on the 20th lap and tore the front nose off his Chevrolet in the infield grass. He returned after repairs that left him 40 laps down -and to a 37th-place finish.