A former interior minister, Aftab Ahmad Sherpao, told the parliamentary committee on national security this month that Shariah ordinances should be introduced to “calm the situation.”

Sherry Rehman, the government information minister, said the deal should not be seen as a concession. “It is in no way a sign of the state’s weakness,” she said. “The public will of the population of the Swat region is at the center of all efforts, and it should be taken into account while debating the merits of this agreement.”

In legislative elections a year ago, the people of Swat, a region that is about the size of Delaware and has 1.3 million residents, voted overwhelmingly for the secular Awami National Party. Since then, the Taliban have singled out elected politicians with suicide bomb attacks and chased virtually all of them from the valley. Several hundred thousand residents have also fled the fighting.

Many of the poor who have stayed in Swat, which until the late 1960s was ruled by a prince, were calling for the Shariah courts as a way of achieving quick justice and dispensing with the long delays and corruption of the civil courts. The authorities in the North-West Frontier Province, which includes Swat, argued that the Shariah courts were not the same as strict Islamic law. The new laws, for instance, would not ban education of females or impose other strict tenets espoused by the Taliban in Pakistan and Afghanistan.

The new accord, they said, would simply activate laws already agreed to by Benazir Bhutto in the early 1990s when she was prime minister. Similarly, the principle of Shariah courts in Swat was also agreed to by Prime Minister Nawaz Sharif in 1999. In both cases, the courts, though approved, were never put in place.

A Pakistani official, who spoke on condition of anonymity because the official did not have permission to speak publicly, said that the government’s acceptance of the courts was an attempt to blunt efforts of the Taliban to woo Swat residents frustrated by the ineffective judiciary.

“The Taliban was trying to take advantage of the local movement and desire for a judicial system,” the official said. The official insisted that the Obama administration, informed of the accord, “showed understanding of our strategy.”