The government of embattled Pakistani President Gen. Pervez Musharraf said Thursday it may impose a state of emergency because of "external and internal threats" and deteriorating law and order in the volatile northwest near the Afghan border. Tariq Azim, minister of state for information, said talk from the United States about the possibility of US military action against al-Qaida in Pakistan "has started alarm bells ringing and has upset the Pakistani public." He mentioned Democratic presidential hopeful Barak Obama by name as an example of someone who made such comments, saying his recent remarks were one reason the government was debating a state of emergency. But it appeared the motivation for a declaration of an emergency would be the domestic political woes of Musharraf, a key US ally in the war on terrorism who took power in a 1999 coup. His popularity has dwindled and his standing has been badly shaken by a failed bid to oust the country's chief justice - an independent-minded judge likely to rule on expected legal challenges to the Musharraf's bid to seek a new five-year presidential term this fall. The Pakistani government's comments on a possible emergency declaration came hours after Musharraf abruptly announced he was canceling a planned trip to Kabul, Afghanistan on Thursday to attend a US-backed tribal peace council aimed at curtailing cross-border militancy by the Taliban and al-Qaida. The decision to cancel the trip appeared linked to the government's deliberations over declaring a state of emergency. Secretary of State Condoleezza Rice spoke at length with Musharraf in a call that took place in the early hours of Thursday in Pakistan, a senior State Department official said. The official, who spoke on condition of anonymity because of the sensitivity of the situation, refused to discuss the substance of the 17-minute conversation. During a state of emergency, the government can restrict the freedom to move, rally, engage in political activities or form groups and impose other limits such as restricting the parliament's right to make laws or even dissolving parliament. "These are only unconfirmed reports although the possibility of imposition of emergency cannot be ruled out and has recently been talked about and discussed, keeping in mind some external and internal threats and the law and order situation," Azim told The Associated Press. "I cannot say that it will be tonight, tomorrow or later. We hope that it does not happen. But we are going through difficult circumstances so the possibility of an emergency cannot be ruled out," he added. Pakistani television networks reported that a declaration of an emergency was imminent, but other senior government officials said no final decision had been made. No announcement had been made by daybreak Thursday. Legal experts and security officials began arriving at Musharraf's office in Islamabad at midmorning for meetings on the issue, a presidential aide said on condition on anonymity because of the sensitivity of the issue. Attorney General Malik Abdul Qayyum said he had been summoned to meet Musharraf later Thursday, but he had not been told the reason. Azim referred to recent Pakistani military action against militants in northwestern border areas that he said had resulted in the deaths of many soldiers. Violence has been rising in the lawless region where critics say a September 2006 peace deal with local Taliban has allowed Islamic militants to thrive. The U.S. has called the deal a failure, saying it gave al-Qaida an opportunity to regroup in the region. Meanwhile, Musharraf on Wednesday pulled out of a "peace jirga" in Kabul that is to bring more than 600 Pakistani and Afghan tribal leaders together with Afghan President Hamid Karzai. Pakistan's Foreign Office said Musharraf had phoned Karzai Wednesday to say he couldn't attend because of "engagements" in Islamabad, and that Prime Minister Shaukat Aziz would take his place. Afghan officials said the jirga would proceed as planned without Musharraf. Aziz held talks with Musharraf early Thursday before leaving for Afghanistan, and that he was due back in Pakistan later in the day. In Washington, the State Department said the US understands Musharraf's decision to pull out of the planned meeting in Afghanistan. "President Musharraf certainly wouldn't stay back in Islamabad if he didn't believe he had good and compelling reasons to stay back," McCormack said. "Certainly we would understand that." Musharraf is under growing American pressure to crack down on militants at the Afghan border because of the fears that al-Qaida is regrouping there. The Bush administration has also not ruled out unilateral military action inside Pakistan, but like Obama, has stressed the need to work with Musharraf. On Wednesday, Obama was asked again about his views on Pakistan. "We can't send millions and millions of dollars to Pakistan for military aid and be a constant ally to them and yet not see more aggressive action in dealing with al-Qaida," he told reporters in Oakland, Calif. However, he did not repeat the most incendiary line from his foreign policy speech last week when he promised: "If we have actionable intelligence about high-value terrorist targets and President Musharraf won't act, we will." On Tuesday night, Obama appeared to soften his position during a debate with other Democratic presidential hopefuls. "I did not say that we would immediately go in unilaterally. What I said was that we have to work with Musharraf, because the biggest threats to American security right now are in the northwest provinces of Pakistan." Obama and his spokesman could not immediately be reached for comment Wednesday on Pakistan's possible declaration of a state of emergency. One of Musharraf's worries back home is a Supreme Court hearing set for Thursday of a petition in which exiled former Prime Minister Nawaz Sharif - ousted in 1999 in the coup that brought Musharraf to power - and his brother are seeking to be allowed to return to Pakistan contest parliamentary elections due by early 2008. Speaking from London to Pakistan's Geo TV, Shahbaz Sharif, brother of Nawaz Sharif, said an emergency would be aimed at stopping two "pillars of the country, two citizens of the country" from coming back. "This will be another blunder by Musharraf. There is no justification, no basis for emergency," he said. Another exiled former Prime Minister Benazir Bhutto - widely reported to have met with Musharraf recently in the United Arab Emirates to discuss a power-sharing deal - said that imposition of emergency would be a "drastic" step that the government should not take. An aide to the president said Musharraf was due to meet with Cabinet ministers, the attorney-general and leaders from the ruling party on Thursday to discuss whether an emergency should be declared. He said he did not expect a declaration of an emergency in the early hours of Thursday. A senior government official said Musharraf had held several meetings Wednesday with Prime Minister Shaukat Aziz, legal experts and top figures of the ruling party and the leaking of possible emergency plans indicated that it was a serious option. Both the aide and the official spoke on condition of anonymity because of the sensitivity of the issue. Under Pakistan's constitution, the head of state - the president - may declare a state of emergency if it is deemed that the country's security is "threatened by war or external aggression, or by internal disturbance beyond" the government's authority to control. If a state of emergency is to be extended beyond two months, it must be approved by a joint sitting of parliament, the constitution says.