Formula One driver Romain Grosjean says he was saved by the halo on his car during a dramatic crash during Sunday’s Bahrain Grand Prix that left him engulfed in flames for nearly half a minute.

Brynn Lennon, Pool via AP

Grosjean’s Haas F1 car pierced a trackside barrier at 140 mph following contact with another vehicle and drove under one of the steel beams as the cage surrounding the cockpit – known as the halo – directed the metal up and over his head.

The device, which includes a bar directly in front of the driver’s line of sight, was added to cars in the series for the 2018 season and received criticism from many drivers, including Grosjean.

Tolga Bozoglu, Pool via AP

“I wasn’t for the halo some years ago but I think it’s the greatest thing we brought to Formula 1 and without it I wouldn’t be able to speak to you today,” Grosjean said in an Instagram message from his bed at the Bahrain Defence Force hospital on Sunday.

Giuseppe Cacace, Pool via AP

Many racing series featuring open-cockpit cars have adopted the halo design, including IndyCar, where it is paired with a windshield.

MORE RACING NEWS FROM FOX NEWS AUTOS

The French driver's car broke apart during the impact and caught fire as he sat inside of it for 27 seconds, but he was protected by his fire-resistant suit and helmet and was able to get out and walk away from the scene. His U.S.-based team issued an update on Monday saying that he only sustained burns to the back of his hands and was expected to be released from the hospital on Tuesday.

“Thanks to all the medical staff at the circuit, at the hospital, and hopefully I can soon write you quite some messages and tell you how it’s going,” Grosjean said in his post.

Formula One Managing Director Ross Brawn said the incident will be investigated to better understand why the car broke apart and caught fire.

CLICK HERE TO GET THE FOX NEWS APP