NASCAR driver Cody Ware had a scary moment in the Autotrader EchoPark Automotive 500 at Texas Motor Speedway on Sunday when he was involved in a bad crash and needed immediate medical attention.

On Lap 168, the No. 51 Ford hit the wall hard and lost control as Ware headed to pit road. He crashed his car to a stop, and he looked bad as he had trouble getting out of his car.

Ware was put in an ambulance and taken to the infield care center. He was later diagnosed with a concussion, according to multiple reports.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Cody Ware gets out of car

Cody Ware, driver of the No. 51 Nurtec ODT Ford, gets in his car during qualifying for the Hollywood Casino 400 at Kansas Speedway in Kansas City on Sept. 10, 2022. (Meg Oliphant/Getty Images)

Driver B.J. McLeod told SiriusXM NASCAR that Ware would be "OK."

Ware didn’t suffer any broken bones after X-ray results came back from the infield care center, according to FOX Sports. He does, however, have some ankle discomfort.

Robby Benton, Ware’s team manager, said that he should be able to drive next week at Talladega Superspeedway for the YellaWood 500, but NASCAR would need to approve it.

FISTS FLY BETWEEN LATE MODEL STOCK CAR DRIVERS AT MARTINSVILLE RACE: ‘I STARTED MIKE TYSON-ING HIS HEAD’

Ware, a 26-year-old who races under his father, Rick Ware’s, Ford team. His last race was at Bristol for the Bass Pro Shops Night Race, where he finished 17th among the field.

Cody Ware waves

Cody Ware, driver of the No. 51 Nurtec ODT Ford, waves to fans as he walks onstage during driver intros prior to the Go Bowling at The Glen at Watkins Glen International on Aug. 21, 2022, in Watkins Glen, New York. (Sean Gardner/Getty Images)

Before this accident from Ware, Harrison Burton’s No. 21 Ford caught fire at pit road after coming in for a pit stop.

CHRIS BUESCHER WINS AT BRISTOL, FOUR DRIVERS ELIMINATED FROM NASCAR PLAYOFFS

He finished sixth at Daytona International Speedway for the Coke Zero Sugar 400 back on Aug. 28.

Cody Ware's car gets tended to

Safety crew personnel assist Cody Ware, driver of the No. 51 Nurtec ODT Ford, after spinning into the pit area during the Autotrader EchoPark Automotive 500 at Texas Motor Speedway in Fort Worth, Texas, on Sept. 25, 2022. (James Gilbert/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

At the moment, Michael McDowell and his No. 34 Ford is leading the way at Texas Motor Speedway.