But the gang had to abandon the attempt with just a small amount of cash when a Garda patrol car arrived at the scene within 40 seconds.

The unarmed gardaí were lucky to escape uninjured after one of the gangsters fired a shot at them, resulting in damage to the windscreen of their marked car.

Two raiders ran from inside the Ulster Bank in Enniscorthy and, together with the gunman, fled the scene in a dark-coloured, high- powered Audi A6.

While a notorious Wexford robbery gang has been suggested as possible suspects, senior sources said they were not necessarily behind it.

The daring robbery occurred at 3.30am at the Ulster Bank branch on Rafter St. Garda sources said the gang breached the ATM machine and pumped some sort of gas into it.

They then ignited it, resulting in an explosion. This ripped the machine apart and allowed the raiders to get inside the bank.

But they had to abort the robbery when gardaí in a patrol car heard the blast and responded.

“The raiders probably thought they’d have two to three minutes to get out, but we were there within 40 seconds,” said a source.

He said a raider fired a shot and that the windscreen of the patrol car was damaged. He said it was the first time this type of robbery had happened in Ireland.

Garda sources were not clear what quantity of cash was taken but suspect it was “not much” given the speed at which the raiders had to abandon the raid.

Money at the dispenser was still being counted last night as forensic specialists began the process of determining what gas and ignition was used in the raid.

Detectives in the south- east have examined similar raids in England and Holland, some of which saw entire walls and roofs blown off.

Gardaí have gathered some CCTV in the area and will today continue harvesting any other footage.

Sources said it was too early to say who might be behind the raid. A Wexford organised crime group that has specialised in robberies for many years will be included as suspects. But one source said it was “not necessarily” them and that they will consider other suspects.

The Wexford outfit was the subject of a Garda operation code-named Slope, from 2009 to 2011. The Traveller gang, linked with another outfit in west Dublin, is believed to have been behind a large number of robberies.

Witnesses or those with information are asked to contact Enniscorthy Garda Station on 053 9242580 or the Garda Confidential Line 1800 666111.