KABUL - President Hamid Karzai Wednesday urged the US military to speed up a transfer of the controversial Bagram prison to Afghan control, his office said, as massive anti-US protests struck the nation.

Karzai spoke during a meeting with the visiting US deputy defense secretary, Ashton Carter, in Kabul amid bloody riots over the burning of copies of the Koran at the US-run Bagram airbase.

“The sooner you do the transfer of the prison, the fewer problems and unfortunate incidents you will have,” the president told Carter, according to a statement from his office.

Two US officials, who spoke on condition of anonymity, told AFP the military removed Korans from the prison because inmates were suspected of using the holy book to pass messages to each other.

Carter, accompanied by the US commander of the 130,000-strong NATO force, General John Allen, had apologised to Karzai over the burning of the religious books at the base, according to the statement from the president’s office.

“The US deputy defense secretary expressed his regrets over the incident and apologized on behalf of (Defense) Secretary (Leon) Panetta to President Karzai and the people of Afghanistan,” the statement said.

Karzai asked Allen to cooperate fully with a government delegation assigned to investigate the incident and told him to “make sure that such incidents do not happen again in future”, the statement said.

Karzai in January gave the US one month to transfer control of the US-run Bagram prison, also known as the Parwan detention facility, and sometimes called Afghanistan’s Guantanamo Bay, citing alleged rights abuses there.

At least five people were killed and dozens of others injured on Wednesday, the second day of anti-US protests unleashed after Afghan workers at the base revealed the burning of copies of the Koran.

Allen has said the Korans were “inadvertently taken to an incineration facility at Bagram airfield”.