A police officer narrowly escaped injury and possibly even death after a house exploded just yards in front of him.

Dashcam footage released by police in Texas shows the officer approach the building as it explodes and becomes engulfed in flames.

The blast, which happened on April 7, happened after a driver had slammed into a gas pipe when his brakes failed.

As the officer walked towards the driver, gas had built up in the home before igniting, sending him and his colleague scrambling for cover.

Three people inside the house were injured but they are expected to recover.

The driver was arrested and charged with not having a driver's licence.

A spokesman for the police department said: "We are thankful that the victims are stable and expected to recover. Our hearts go out to them and their family."