Taleban militants stormed a prison in Afghanistan last night, blowing open its main gates with a car bomb and freeing more than 1,000 inmates.

Several suicide bombers, dozens of fighters on motorbikes and a number of rockets were also used in the carefully orchestrated operation at the jail in Kandahar.

Under cover of darkness, most of the 1,150 prisoners, including some 400 Taleban, are believed to have fled.

Some prisoners are believed to have been killed in the crossfire of a gun battle between police and the insurgents who managed to get inside the jail.

An unknown number of prison guards were also killed.

A state of emergency has now been declared in Kandahar city. Police and troops were on the streets and all residents were ordered to remain in their homes.

Officials said the attack, which lasted 30 minutes, began when a tanker full of explosives was detonated at the prison’s main gate.

Minutes later, a suicide bomber on foot blasted a hole in the back of the prison and around 50 fighters stormed inside. One shopkeeper selling vegetables near the prison said he saw prisoners escape after the attack and run toward pomegranate and grape groves lying behind the complex.

Abdul Quadir, the prison director, said: “They (the Taleban] used a truck to blow the gate open and all of the guards at the gate have been killed and are under rubble.”

Wali Karzai, brother of Afghanistan president Hamid Karzai and the president of Kandahar’s provincial council, confirmed: “All the prisoners escaped. There is no one left.”

Qari Yousef Ahmadi, a spokesman for the Taleban, said 30 insurgents on motorbikes and two suicide bombers attacked the prison. He claimed that the attack had been planned for the last two month, “to release our Taleban friends”.

“Today we succeeded,” he said, adding that the escaped prisoners “are safe in town and they are going to their homes”.

The prison holds common criminals but also Taleban militants fighting Nato troops and the Afghan government.

Officials with Nato’s International Security Assistance Force said they were aware of the attack but had no details.

Last month, some 350 Taleban suspects held at the Kandahar prison ended a week-long hunger strike after a parliamentary delegation promised their cases would be reviewed.

Some of the hunger strikers are believed to have been held without trial for more than two years. Others received lengthy sentences after short trials.

Kandahar – the Taleban’s former stronghold and Afghanistan’s second-largest city – has been the scene of fierce battles between Nato forces and insurgent fighters over the last two years.

The US military has handed over an unspecified number of suspected Taleban fighters to Afghan custody under a programme agreed last year to transfer all Afghan prisoners from American detention.

You simply cannot make this stuff up. In a scene reminiscent of Mad Max or The Road Warrior, 30 motorcyclists managed to take out a prison and release 1150 criminals, 400 Taliban among them. Where was the force protection? Where were the vehicle barriers (you know, those mechanically operated devices that flatten your tires if you go over them the wrong way)? Where were the concrete truck barricades? Where was the training? Where was the supervision? Forget expensive UAVs and road construction for a minute. What about spending a little money on teaching the Afghan police about combat and force protection. Failure to do so has cost us the freedom of 400 Taliban – and potentially U.S. lives to capture or kill them again.

If this is the state of the Afghan police, then Hamid Karzai was prescient when he said that Afghanistan would need U.S. troops for ten or more years. The Afghan police appear to be completely inept. But what we do over these next ten years is important. Take careful note of the handover of Taliban to Afghanistan, resulting perhaps in part due to the delays in processing prisoners through Gitmo and anticipation of the recent SCOTUS decision.

Many lives were put in jeopardy to capture these Taliban, and it is far better to kill the enemy on the field of battle than it is to capture them, feed them and try them, or see them broken free by 30 motorcyclists.