Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Daytona 500 ended Monday with Denny Hamlin claiming his second consecutive win and a fiery crash that sent Ryan Newman's Ford Mustang across the finish line on its roof.

Newman sustained serious but non-life-threatening injuries in the crash, Newman's Roush Fenway Racing team said in a statement late Monday. He was being treated at Halifax Medical Center in Daytona Beach, Florida.

The crash occurred on the race's final lap, with Newman in the lead and another driver, Ryan Blaney, right behind him.

Blaney's bumper caught the back of Newman's car, which barreled into a wall and flipped before it was struck by another vehicle.

It took several minutes for Newman's car to be rolled back onto its wheels.

NASCAR driver Denny Hamlin celebrates after winning the Daytona 500 at Daytona International Speedway in Daytona Beach, Florida, on Monday, Feb. 17, 2020. Joe Gibbs, the car's owner, later apologized for the team's celebrations, saying they didn't know the extent of Ryan Newman's injuries. Brian Lawdermilk / Getty Images

Newman, who won the 2008 Daytona 500, was placed in a waiting ambulance and taken directly to a hospital. The damage to his Mustang was extensive. It appeared that the entire roll cage designed to protect his head had caved in.

President Donald Trump, the race's grand marshal, said he was praying for Newman, whom he called a "great and brave" driver.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Praying for Ryan Newman, a great and brave @NASCAR driver! #PrayingForRyan — Donald J. Trump (@realDonaldTrump) February 18, 2020

Pete Buttigieg, the Democratic presidential candidate, also offered well wishes for a "son" of South Bend, Indiana, where Buttigieg was mayor for eight years.

Newman, 42, who was born in South Bend, now lives in Statesville, North Carolina.

Drivers were also stricken with concern, including a rattled Corey LaJoie, the driver who hit Newman's car as it was flipping.

"Dang I hope Newman is ok," he posted on Twitter. "That is worst case scenerio and I had nowhere to go but [into] smoke."

Hamlin is the first driver since Sterling Marlin in 1995 to win consecutive Daytona 500s, but his celebration in victory lane was subdued.

"I think we take for granted sometimes how safe the cars are, and number one, we are praying for Ryan," Hamlin said.

Download the NBC News app for breaking news

In an interview on Sirius XM NASCAR following the race, Joe Gibbs, owner of Joe Gibbs Racing, which runs the winning car, apologized for his team's celebration as workers were tending to Newman. Gibbs said they were not aware of the severity of the situation.

Blaney, the runner-up, said that the way the final lap shook out, with Newman surging ahead of Hamlin, locked Blaney in behind Newman in a move of brand alliance for Ford.

"We pushed Newman there to the lead, and then we got a push from the 11 [Hamlin's car]. ... I was committed to just pushing him to the win and having a Ford win it and got the bumpers hooked up wrong," he said. "It looked bad."

NASCAR driver Ryan Newman crashes and flips his #6 Ford during the Daytona 500 at Daytona International Speedway in Daytona Beach, Florida, on Monday, Feb. 17, 2020. Chris Graythen / Getty Images

Hamlin had eight Ford drivers lined up behind him as the leader in the second overtime shootout without a single fellow Toyota driver in the vicinity to help him. That allowed Newman to get past him for the lead, but the bumping in the pack led to Newman's hard turn right into the wall, followed by multiple rolls and a long skid across the finish line.

Hamlin's win last year was a 1-2-3 sweep for Joe Gibbs Racing, and it kicked off a yearlong company celebration in which Gibbs drivers won a record 19 races and the NASCAR Cup championship. His third Daytona 500 win puts him alongside five Hall of Fame drivers as winners of three or more Daytona 500s. He tied Dale Jarrett — who gave Joe Gibbs Racing its first Daytona 500 win in 1993 — Jeff Gordon and Bobby Allison. Hamlin trails Cale Yarborough's four wins and the record seven by Richard Petty.

The victory came after just the second rain postponement in 62 years, a visit from the president, a pair of red flag stoppages and two overtimes. The 0.014-second margin of victory was the second closest in race history — behind only Hamlin's win over Martin Truex Jr. in 2016 at 0.01 seconds.

The win in "The Great American Race" is the third for Toyota, all won by Hamlin. Gibbs has four Daytona 500 victories as an owner.

"I just feel like I'm a student to the game. I never stop learning and trying to figure out where I need to put myself at the right time," Hamlin said. "It doesn't always work. We've defied odds here in the last eight years or so in the Daytona 500, but [I] just trust my instincts, and so far they've been good for me."