Updated

Pakistan's top court on Monday gave the country's prime minister three more weeks to decide whether to obey its order to reopen an old corruption case against the president or face the prospect of being ousted from office like his predecessor.

The decision followed an appearance by Prime Minister Raja Pervaiz Ashraf before the judges and was seen as a rare conciliatory gesture by the supreme court toward the government after months of conflict over the issue.

With the reprieve, the judges may be responding to criticism from the public for relentlessly pursuing the case. Some have suggested the court should focus on legal matters affecting ordinary citizens and leave the government alone to tackle pressing problems like the country's ailing economy and fight against the Taliban.

Taliban militants coming from Afghanistan attacked an area of northwest Pakistan for the fourth day in a row Monday, trapping people in villages where the fighting was most fierce, said officials and local residents.

The dispute involving the prime minister centers on a graft case in a Swiss court against President Asif Ali Zardari dating back to the late 1990s. The Pakistani Supreme Court has demanded the government write a letter to Swiss authorities asking them to reopen the case. The government has refused, saying Zardari enjoys immunity from prosecution while in office.

Zardari is in little immediate danger of being tried — the Swiss have indicated they have no plans to continue with the case, at least not while the president is in office. But the supreme court still wants the government to write the letter.

The court convicted then-Prime Minister Yousuf Raza Gilani of contempt in April and ousted him from office two months later for rejecting its order. The ruling Pakistan People's Party rallied support to elect the new premier, Ashraf, and has given no indication it plans to implement the court's decision.

Many expected the judges to announce Monday that they would charge Ashraf with contempt for also refusing to write the letter.

Instead they gave the prime minister until Sept. 18 to decide whether he would follow the court's order, after he argued he needed more time to find a way to resolve the crisis — an argument the government has made in the past when faced with similar deadlines.

"The government and I have full respect for the courts, and I have a strong desire to resolve this issue amicably so the prestige and respect of the judiciary is not only maintained, but is increased," Ashraf said.

It is unclear what sort of compromise could end the dispute. Zardari has said in the past that his government will never write the letter.

The cross-border attacks carried out by militants over the past four days appear to be targeting anti-Taliban militiamen in the Bajur tribal area.

The fighting so far has killed 31 militants, three security personnel and two militiamen, said a military official, speaking on condition of anonymity because he was not authorized to brief reporters.

The Pakistani Taliban have claimed responsibility for the attacks, and the group's spokesman, Ahsanullah Ahsan, said they have killed four soldiers and four militiamen. He claimed the group has seized control of Salarzai and was bringing in reinforcements.

A local government administrator, Jahangir Azam Wazir, denied the claim, saying most of the area had been cleared.

A former senator from Salarzai, Maulana Abdur Rasheed, said hundreds of families are trapped in three villages where the fighting has been heaviest. The military said the number was far fewer, but did not provide specific figures.

An Associated Press reporter who visited Salarzai on Monday heard constant gunfire and loud explosions from artillery fired by the military.

Hazrat Gul, a farmer from one of the villagers under siege, said he hasn't been able to get in touch with his family for three days and doesn't know whether they are still alive.

Pakistan has criticized Afghan and U.S.-led coalition forces for not doing enough to stop the rising number of cross-border attacks by Pakistani Taliban militants holed up in the Afghan provinces of Kunar and Nuristan, across the border from Bajur.

That criticism could soften after the coalition killed a senior Pakistan Taliban commander in an airstrike in Kunar on Friday. Mullah Dadullah, was the leader of the Pakistani Taliban in Bajur. He was killed along with 11 others, including his deputy.

The U.S. and Afghan governments have long criticized Pakistan for failing to prevent militants using sanctuaries inside the country from attacking targets inside Afghanistan.

____

Associated Press writer Anwarullah Khar in Khar, Pakistan, contributed to this report.