When the British Council compound in Kabul was attacked on Friday by insurgents city police sent away Afghan commandos. A New Zealand SAS soldier died during the rescue of two council teachers. Photograph: Jalil Rezayee/EPA

A turf war between Kabul's police and SAS-trained Afghan commandos caused a potentially life-threatening delay to the operation to rescue two British Council workers penned in by suicide bombers, according to the rescue team.

The standoff last Friday between the city's police and the Crisis Response Unit (CRU), which lasted for more than four hours, gave the attackers time not just to overwhelm the fortress-like compound, but also to launch a terrifying assault on the reinforced door of the cramped safe room where the two employees of the British Council had taken refuge.

According to Ghulam Daoud, leader of the commando team, the insurgents used several hand grenades in their unsuccessful attempts to blast open the door, located in a narrow area under a flight of stairs, where the two teachers had taken refugee with a security guard from the private British company G4S.

"They were very well informed, they knew exactly where the strong points were and where the safe room was," said General Sayed Abdul Ghafar, director of Afghan special forces.

The two women, one British and the other South African, have not yet been named although diplomatic sources said one of them had only arrived in Afghanistan 48 hours earlier to work on the British Council's educational and cultural programmes.

They were rushed to the tiny safe room, in a building in the centre of the compound, at 5.40am under covering fire from private guards on the roof of the compound after a vehicle packed with explosives ripped through the front gate.

It destroyed the double-layered "airlock" of concrete walls, metal gates and other defensive measures.

A second group of terrorists, armed with bombs and guns, stormed into the compound, overwhelming the guard force of Gurkhas and Afghans employed by G4S, the giant British security company.

Photographs of the devastated compound in the relatively upmarket neighbourhood of western Kabul show that the safe room had just enough space for a mattress, some cushions and bits of equipment.

While the two teachers and guard were trapped inside, waiting for rescue, they were able to talk to embassy officials by mobile phone. They also had time to pin Union flags to their chests, to identify themselves clearly when the Afghan commandos arrived.

But that took far longer than anyone would have hoped because of an argument over jurisdiction between different arms of the Afghan security forces.

Ghafar, the special forces chief, got to the scene within 20 minutes but his team was sent away by Kabul's police chief, General Mohammad Ayub Salangi.

"We finally called back at 9.45 but in all that time the stupid policemen did not do anything," said Ghafar.

One international official said Salangi had handled the situation like an "idiot". However, the police chief insisted that he was simply "following procedures" and claimed not to have ordered the CRU away.

New Zealand SAS team

At 10am, more than four hours after the attack began, the CRU team of 20 commandos, joined by five soldiers of the New Zealand SAS who rushed to the scene from their base on the other side of the city, began their assault on the compound.

But their initial attempt to drive through the blasted, wrecked main gate in an armoured Humvee was repulsed by an hail of bullets that even broke the vehicle's armoured windows. One CRU commando died there.

The rescuers' work was made even more difficult by the British Council's own elaborate defences – including bulletproof glass on all the windows – giving insurgents strong fighting positions to hold back the rescue party.

"The enemy had time to occupy all the bulletproof checkpoints [inside the compound] that we could not attack," said Daoud, leading the CRU unit. The frontal assault strategy was abandoned.

Meanwhile, the New Zealand SAS team turned their attention to the back of the compound, blowing a hole in a rear wall, and allowing the CRU commandos to storm in from a neighbouring building.

Daoud confirmed that, while the CRU is a highly regarded special forces team, it does not yet have engineers trained to break through walls.

When they finally got into the compound the telltale smell of "cooked kebab" showed suicide bombers had already exploded themselves, he said.

New Zealand and Afghan snipers occupying positions in overlooking buildings were able to provide some cover to their colleagues from insurgents firing from their heavily defended positions on the upper floor of the guesthouse where British Council staff were hiding.

But that was not enough to save Corporal Grant, a New Zealand SAS member who was shot and mortally wounded as he ran along the edge of the compound.

The Afghan commandos also revealed that the three non-Afghans were removed from the building long before all the insurgents inside had been killed.

There remained at least one suicide bomber still fighting upstairs, and a fire was spreading in the building, so the rescue party decided not to wait.

Sniper teams were ordered to train all their fire on the area where the insurgent was still holed up, allowing three other British Council workers to move to a nearby gym, which had been made from a metal sea container. The New Zealand commandos blew up another section of wall and they escaped.

The fire in the building also forced a Gurkha, who had been on the roof since the start of the siege, down from his position in the roof.

But even though the foreigners were safe, the fighting still raged for control of the building with troops occasionally so close to attackers that they could punch them, said Ghafar. At one point an attacker, after being shot, managed to detonate his vest, injuring but not killing five CRU commandos.

Despite the heat, fighting for several hours in the summer sun, none of the commandos was subsequently able to eat or drink because it is the fasting month of Ramadan.

At the end of the operation the team went to a nearby carwash and hosed themselves down with water.