Last weekend, Romain Grosjean walked away from the wreckage of one of the most horrific Formula One crashes in recent history. During the opening lap of the Bahrain Grand Prix, Grosjean clipped Daniil Kvyat's AlphaTauri, sending the car hurtling into a nearby metal barrier at terrifying speed.

In dramatic scenes, the car ripped through the barrier, split in half, and burst into flames instantly. It's a testament to modern safety innovations that Grosjean survived with relatively minor injuries and was able to walk away with the help of quick-reacting marshals and medical staff. But how did Grosjean survive such a serious accident?

As YouTube channel The Race explains, Grosjean's Haas F1 Team car, which is powered by a Ferrari-sourced hybrid engine similar to the SF90 Stradale, slammed into the metal barrier at 137 mph. With no time to decelerate, the speed and angle of the car caused the barrier to penetrate on impact. The front of the car containing Grosjean wedged into the barrier, causing the rear of the chassis to break away from the driver survival cell, which is designed to protect the driver from hard impacts. Damage to the fuel cell caused fuel to leak and erupt in a massive fireball. It's believed the hot battery pack that detached ignited the flames.

Watching the scene unfold live, you'd be forgiven for fearing the worst. Grosjean was trapped in the flames for 26 seconds before he managed to free himself and leap over the barrier with the help of Dr. Ian Roberts, who arrived on the scene in a Mercedes E63 Wagon medical car.

Driving the medical car was Alan van der Merwe, who promptly extinguished Grosjean and Roberts. Roberts also helped remove Grosjean's helmet as the visor was melting from the intense heat. Fortunately, no smoke entered the helmet. Thankfully, fiery crashes like this are now rare in F1. Not since Gerhard Berger's crash at Imola in 1989 has an F1 car burst into flames on impact. This is also the first time an F1 car has split in two since Alex Caffi's crash in Monaco in 1991.

Without a doubt, the halo fitted above the cockpit saved Grosjean's life. Without it, his helmet would have struck the barrier, which would likely have been fatal at such high speed. Grosjean is currently recovering in hospital and receiving treatment for burns on the back of his hands.

Despite the severity of the crash, he didn't suffer any fractures and was in good spirits. "Hello everyone, just wanted to say I'm okay, well, sort of okay," Grosjean said in a video shared on his Instagram account from the hospital showing his bandaged hands. "Thank you very much for all the messages. 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. 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."

The FIA is currently investigating the accident to find out what caused the barrier to break in order to prevent a similar accident from happening again.