Martin Truex Jr. celebrates his Coca-Cola 600 victory Sunday night at Charlotte Motor Speedway in Concord, N.C.

CONCORD, N.C. — Martin Truex Jr. gave team owner Joe Gibbs another reason to celebrate at Charlotte Motor Speedway.

Truex overcame an early flat tire after hitting the wall, then broke to the front on a wild final restart Sunday night and won the Coca-Cola 600 for the second time in four seasons.

It was the perfect cap to a landmark stretch for Joe Gibbs Racing. The three-time Super Bowl champion coach was voted into the NASCAR Hall of Fame this past Wednesday, along with two of his race team's former championship-winning drivers, Bobby Labonte and Tony Stewart.

Gibbs, though, said it was Truex who delivered JGR's biggest moment in his first season with the team.

"What was Wednesday?" Gibbs responded when asked if the race victory was bigger than the Hall of Fame.

Gibbs broke into laughter when reminded about his honor.

"Obviously, I'm excited about tonight," he said with a smile.

Truex provided much of the excitement.

He slid into the wall in the fourth turn on the 1.5-mile track during the first stage of NASCAR's longest event, damaging a tire and seemingly putting his chances in serious jeopardy. Crew chief Cole Pearn radioed his driver that things were not that bad, though, and to stay calm and remain focused.

"I thought, 'We're done. How are we going to fix this thing?'" Truex said. "I didn't know how bad it was, (but) the guys worked hard, fixed it up."

That steadied Truex the rest of the way, especially near the end when he drove low during a four-wide fight for the lead on the final restart of the 600-mile race. He had an easier time in the 2016 race, when he led 392 of 400 laps in a dominant win for Furniture Row Racing, which folded after last season.

Truex sprang out low and shot into the front past Kyle Busch, Ryan Newman and David Ragan as they stretched four wide across the track.

"You just never know what can happen," said Truex, who led 116 laps this time.

Truex held off 2018 Cup Series champion Joey Logano, a Team Penske driver, again preventing owner Roger Penske from becoming the first to helm winners at the Indianapolis 500 and Coca-Cola 600 on the same day.

Truex, the 2017 Cup Series champion, was happy to provide his boss another win. It was the 22nd win of Truex's career on the top-tier series and his third in the past five races.

"To think a guy can be in the Pro Football Hall of Fame and the NASCAR Hall of Fame just tells you how special (Gibbs) is, and I'm super honored to drive for him," Truex said.

Pearn said the car was seriously damaged by the early run into the wall and it took several trips to the pits to fix. Still, in victory lane, Pearn couldn't believe his team came out on top.

"It was crazy to see the car be that good and be that banged up," he said.

Team Penske driver Brad Keselowski won the first two stages and appeared to have the strongest car, but he slipped to the middle of the pack during the third 100-lap segment and never challenged for the victory. He finished 19th.

Busch was third, Chase Elliott fourth and Ricky Stenhouse Jr. fifth.

Logano said Truex had the faster car in the race. If Logano had gotten to Truex's outside, though, he may have had a chance to move in front, he said.

Truex "knew the same thing," Logano said. "He did a good job defending his position."

There were 16 cautions, the most at this event in 14 years. The slowdowns included breaks between stages, but the yellow flags slowed things enough that the race took more than five hours to complete.

All-Star race winner Kyle Larson had hoped to build off his $1 million-winning run at the track the weekend before. Instead, he lost grip in the final stage, hitting Clint Bowyer to start a wreck that collected seven drivers. Larson said the fault was his.

"Up-and-down day for us," Larson said. "I finally put myself in a good spot for about a lap, and I screwed that up."

Larson has not won a Cup Series points race since taking the checkered flag at Richmond Raceway in September 2017, a span of 59 races.

NASCAR held a moment of remembrance for military personnel who lost their lives in service as cars were led into the pits and halted at the halfway point of the race. Drivers turned off their engines and fans stood quietly during 30 seconds of silence as part of the solemn ceremony the night before Memorial Day.