KABUL, Afghanistan  President Hamid Karzai said Tuesday that Afghanistan would not be able to pay for its own security until at least 2024, underscoring his government’s long-term financial dependence on the United States and NATO even as President Obama has pledged to begin withdrawing American troops in 2011.

Mr. Karzai spoke at a news conference here with Secretary of Defense Robert M. Gates, who did not put a timetable on the American and allied financial commitment but acknowledged that there was a “realism on our part that it will be some time before Afghanistan is able to sustain its security forces entirely on its own.”

The news conference came just hours after as many as a dozen people were killed during an allied raid in Laghman Province, Afghan officials said, prompting hundreds of villagers to march in protest.

The early morning operation outside the provincial capital, Mehtar Lam, east of Kabul, happened “without any coordination with the Afghan forces or Afghan officials,” said Sayed Ahmed Safi, a spokesman for the governor of Laghman. He said one woman was among the dead, which included civilians as well as insurgents, all killed by small-arms fire. He said the troops also detained four men.