ISLAMABAD, Pakistan — Pakistani officials said on Saturday that NATO aircraft had killed at least 25 soldiers in strikes against two military posts at the northwestern border with Afghanistan, and the country’s supreme army commander called them unprovoked acts of aggression in a new flash point between the United States and Pakistan.

The Pakistani government responded by ordering the Central Intelligence Agency to vacate the drone operations it runs from Shamsi Air Base, in western Pakistan, within 15 days. It also closed the two main NATO supply routes into Afghanistan, including the one at Torkham. NATO forces receive roughly 40 percent of their supplies through that crossing, which runs through the Khyber Pass, and Pakistan gave no estimate for how long the routes might be shut down.

A NATO spokesman said it was likely that allied airstrikes caused the Pakistani casualties, but said an investigation had been ordered to determine the cause.

In Washington, American officials were scrambling to assess what had happened amid preliminary reports that allied forces in Afghanistan engaged in a firefight along the border and called in airstrikes. Senior Obama administration officials were also weighing the implications on a relationship that took a sharp turn for the worse after a Navy Seal commando raid killed Osama bin Laden near Islamabad in May, and that has deteriorated since then.