Afghan President Hamid Karzai demanded Tuesday that the U.S.-led coalition stop all airstrikes on Afghan homes, drawing his government closer than ever to direct opposition to the American presence here.

The comments could complicate President Obama’s looming decision on how quickly to withdraw U.S. troops from Afghanistan. Even for Western officials accustomed to Karzai’s rebukes, his latest remarks were cause for deep concern, because they went further than before in calling for radical change in how NATO fights its war.

Tuesday’s demand followed his earlier insistence that foreign forces end night raids, stop unilateral operations, and stay off roads and out of Afghan villages. With each call, Karzai has outlined in ever more stark lines a vision of a vastly less aggressive U.S. military posture against the Taliban. The stance is particularly risky for him politically because his government relies on NATO for its political and economic survival.

“I warn NATO forces that a repeat of airstrikes on the houses of Afghanistan’s people will not be allowed,” Karzai said at a news conference at the presidential palace. “The people of Afghanistan will not allow this to happen anymore, and there is no excuse for such strikes.”

He added that foreign forces are close to “the behavior of an occupation” and the “Afghan people know how to deal with that” — a thinly veiled threat that Afghans could rise up against NATO and drive them out as with past occupying armies. He said Afghanistan would be “forced to take unilateral action” if the bombardment of homes did not cease, although he did not specify what that action would be.

“History is a witness [to] how Afghanistan deals with occupiers,” he said.

Karzai lacks the authority to order NATO to stop airstrikes on homes. But his criticism strikes at a central weapon for U.S. military planners: Airstrikes have surged during the past year and numbered nearly 300 in April.

The immediate provocation for Karzai’s remarks was a U.S. military airstrike in southern Afghanistan’s Helmand province that killed at least nine civilians, including children. But Karzai’s statement also was the culmination of years of complaints about civilian casualties and aggressive NATO military operations.

Some Western diplomats in Kabul who have worked closely with Karzai think these statements reflect his authentic beliefs and are not simply an attempt to score domestic political points. They say he is deeply frustrated by his inability as president to exert real authority over the foreign presence in Afghanistan.

The timing of Karzai’s remarks has compounded the political problem for U.S. policymakers. Obama will make a decision this month on how fast to begin withdrawing troops in July. Meanwhile, the United States and Afghanistan are negotiating the terms of their strategic partnership after 2014, at which point Afghan authorities are supposed to have assumed full responsibility for the nation’s security. Some U.S. officials said Karzai might be attempting to strengthen his position ahead of the arrival of a new U.S. military commander, Lt. Gen. John R. Allen, and a new U.S. ambassador, Ryan C. Crocker.

“I think part of him is crying out for help,” said one senior Western diplomat in Kabul, who spoke on the condition of anonymity because of the sensitivity of the matter.

Both the top U.S. commander in Afghanistan, Gen. David H. Petraeus, and his predecessor, Gen. Stanley A. McChrystal, have referred at times to Karzai as their commander in chief — a bow to the authority of an elected Afghan government. But in reality, that chain of command is not binding. The U.S. military operates in Afghanistan under a NATO mandate and does not have a bilateral “status of forces” agreement with Afghanistan that would legally restrict operations. Karzai’s demands to stop night raids and coalition airstrikes struck one U.S. military official as “mind-boggling.”

Since Petraeus took command lin July, the number of U.S. and allied airstrikes in Afghanistan has soared. While McChrystal had clamped down on airstrikes to avoid angering Afghan civilians, Petraeus and his staff have been more aggressive, roughly boosting the number of airstrikes to levels that existed before McChrystal took charge in June 2010.

The monthly tally of allied airstrikes — flights that resulted in dropped bombs, fired missiles or other weapons discharges — peaked in October at 1,043, according to U.S. Air Force statistics. The monthly figures have subsided sharply since then, falling to 287 in April, the most recent month for which complete statistics are available. Overall, however, the number of airstrikes during the first four months of 2011 has been more than 80 percent higher than in the same period last year.

Civilian casualties

United Nations estimates attribute the majority of civilian casualties in Afghanistan to insurgents rather than to NATO forces.

The U.N. recorded 2,777 civilian deaths last year in Afghanistan, an increase of 15 percent over 2009. Of those, 75 percent were caused by insurgents, while 16 percent were attributed to NATO and Afghan forces, according to the U.N. mission’s latest annual report. Nine percent of the civilian deaths could not be attributed.

Karzai, however, has continually highlighted NATO’s civilian casualties over those of the insurgents. He said his demands would be discussed at a meeting with NATO officials next week.

“If this is repeated, Afghanistan has a lot of ways of stopping it, but we don’t want to go there. We want NATO to stop the raids on its own, without a declaration of an end by the Afghan government, because we want to continue to cooperate,” he said. “They must treat Afghanistan as a sovereign nation.”

Although U.S. and NATO officials say they have made reducing civilian deaths a top priority, they concede that it is almost impossible to eliminate them entirely, particularly as insurgents fight in and among the population. They said the deaths last week in Helmand were such an example.

On Saturday, a U.S. Marine patrol was attacked by five insurgents in the Now Zad district of Helmand, killing one Marine. U.S. military officials described the assault as an attack from three sides and said the Marines were “pinned down” by gunfire. The insurgents then took cover in a walled house and continued to fight until the Marines called in a Harrier fighter jet for an airstrike. “Unfortunately, the compound the insurgents purposefully occupied was later discovered to house innocent civilians,” U.S. Marine Maj. Gen. John Toolan, the NATO commander in Afghanistan’s southwest, said in a statement.

Petraeus’s tactical directive on airstrikes says that troops cannot call in close air support on a housing compound unless they are under an imminent threat; simply watching insurgents run into a house is not sufficient grounds for an airstrike.

“Everything we’ve seen indicates this was within the current directive,” said one U.S. military official in Kabul. “The only way they could get out of the situation and survive was to call in close air support.”

Whitlock reported from Washington. Staff writer Rajiv Chandrasekaran in Washington and special correspondents Javed Hamdard and Sayed Salahuddin in Kabul contributed to this report.