A nail-bitingly close call in Madrid left a bus teetering off the side of a bridge, at risk of plunging onto a road below, after its driver lost control and smashed through the safety barrier on Sunday.

The Municipal Transport Company (EMT) bus came to a dramatic halt with its front half hanging precariously off the edge of the bridge on the M-11 at about 6am.

READ MORE: Barely-believable highway collision sees dump truck plow into bridge (VIDEO)

Luckily, there were no passengers on board at the time, and although the driver was slightly injured in the crash, he managed to escape the teetering bus by himself.

Video taken from the bridge shows just how lucky the driver was. The vehicle was an articulated ‘bendy’ bus, and half of its front section was completely suspended over the road below.

Madrid’s fire brigade arrived at the scene to pull the bus back from the edge, using large sling-like ropes and a crane to recover the vehicle. It was transported back to the EMT garages by 8am, El Pais reports.

The collision took place when the bus was on its way back collect people from the Mad Cool Festival in Valdebebas. Police are investigating whether the accident was a result of mechanical failure or driver error.

Think your friends would be interested? Share this story!