Afghan President Hamid Karzai says that American forces are violating an agreement to transfer detainees. (Anja Niedringhaus/AP)

President Hamid Karzai has ordered his aides to institute the “full Afghanization” of the U.S.-run prison at Bagram air base, charging that American forces are continuing to detain Afghans despite a bilateral agreement in March to transfer all prisoners to Afghan authorities.

In a Pashto-language statement tweeted from the presidential palace late Sunday after Karzai met with his top security officials, the president complained that some prisoners ordered released by Afghan courts are still being held by U.S. forces.

“These acts are completely against the agreement that has been signed between Afghanistan and the U.S. president,” the statement said.

It said the Afghan defense minister, the attorney general and the national police general in charge of the Bagram prison should “take all required actions for full Afghanization of Bagram prison affairs and its complete transfer of authority to Afghans.”

The statement did not specify a date or time frame for the takeover, but Afghan officials said a two-month grace period had ended for the Obama administration to find an alternative to detaining prisoners without trial.

The Afghan president’s provocative statement came shortly after Afghan and American officials began negotiating a bilateral security agreement that is intended to define the U.S. military’s role in Afghanistan after most international combat troops leave the country by the end of 2014.

There was no immediate reaction from U.S. officials here, but several Afghan observers said Monday that Karzai was trying to put public pressure on the United States so it would make more concessions to him in the final security agreement, while also trying to demonstrate his nationalistic credentials to his domestic audience.

“This agreement is more important for us than for the United States, but some of the president’s comments make it more difficult,” said Khalid Pashtoon, a lawmaker from southern Kandahar province who has been promoting the bilateral agreement. Pashtoon said that Karzai basically favors a comprehensive and solid security accord but that he wants to wrest as many conditions as he can during the negotiating process.

Daoud Sultanzoy, a former lawmaker from eastern Ghazni province, offered a similar assessment, saying that Karzai “wants to prove he’s a patriot” and that he is convinced that the United States needs to remain in Afghanistan for its own interests, thus allowing him to press for more concessions.

The two governments signed a broad strategic partnership accord in May that included the detainee-transfer agreement, but U.S. officials have resisted handing over prisons under their control, partly because they do not think Afghans are ready to assume the responsibility for running them.

Afghan and U.S. officials have also disagreed on the issue of detention without trial. Washington wants the Afghan government to continue holding certain prisoners it views as dangerous, even if there is not enough evidence to try them.

Aimal Faizi, the chief spokesman for Karzai, told reporters Monday that detention without trial is illegal in Afghanistan and that more than 50 Afghans are still being held in U.S. custody at Bagram, 35 miles northeast of Kabul, even though they have been ordered released by Afghan courts.

One Afghan analyst said Monday that Afghan courts had released prisoners in the past several years who were later linked to Taliban activities or terrorist attacks.

Karzai has raised several other objections that could undermine the negotiations on the security agreement. He opposes giving U.S. forces immunity from Afghan prosecution if they kill Afghan citizens, an issue that will be critical during the talks.

Afghan and American officials have agreed that the negotiations can take up to a year. For the United States, it is especially important to avoid a repeat of its exit from Iraq, in which both sides were unable to agree on the rules that would have allowed a small U.S. military assistance force to remain in Iraq after the end of combat operations.

In Afghanistan, both U.S. and Afghan military officials have said that they would like an American force of up to 20,000 to remain in place after 2014 to shore up the Afghan army and security forces with training, logistical support and special operations.