(Adds pro-Musharraf party nominates candidate for president)
By Jerry Norton
ISLAMABAD, Aug 25 (Reuters) - Former Pakistani prime minister Nawaz Sharif pulled his party out of the ruling coalition on Monday, deepening a political crisis that has diverted government attention from pressing security and economic problems.
The move came just a week after the coalition parties had celebrated the resignation of President Pervez Musharraf in the face of the coalition's threat to impeach him.
Sharif said the party of assassinated former prime minister Benazir Bhutto, which leads the coalition, had repeatedly broken promises on resolving a judicial dispute and on who should be the next president.
"We therefore feel that these repeated defaults and violations have forced us to withdraw our support from the ruling coalition and sit on the opposition benches," Sharif told a news conference.
The departure of his party is not expected to force a general election as Bhutto's Pakistan People's Party (PPP), now led by her widower Asif Ali Zardari, should be able to gather enough support to govern, analysts say.
Sharif also said he would not try to destabilise the government. "We'll play the role of a constructive opposition."
The coalition, formed after Musharraf's allies lost a February general election, had looked increasingly precarious since Musharraf resigned a week ago.
The PPP and Sharif's party were bitter rivals during the 1980s and 90s, when Bhutto and Sharif were both chosen twice as prime minister, but they found common ground more recently in their opposition to Musharraf.
His departure undermined the logic of their alliance.
Sharif had pulled his ministers out of the cabinet after an earlier deadline passed to restore judges Musharraf purged last year. He had repeatedly threatened to withdraw from the coalition and last week set Monday as his latest deadline.
The PPP is reluctant to restore the judges partly because of concern the deposed chief justice might take up challenges to an amnesty granted to Zardari and other party leaders from graft charges last year, analysts say.
Before Musharraf sacked them, the judges -- the former chief justice in particular -- were quite willing to challenge his government on the legality of various decisions, a tendency the PPP may not view with enthusiasm now that it governs.
Another divisive issue is who should be the nuclear-armed country's next president.
The PPP announced on Saturday that Zardari would be its candidate.
Sharif said that violated an earlier agreement with the PPP for a non-partisan candidate if the presidency retained certain powers, including to dismiss parliament.
Sharif wants the post of president stripped of powers, but a senior official from Bhutto's party said at the weekend the question of powers would be dealt with only after the presidential election.
Sharif named his party's candidate for president, a former chief justice, Saeeduzzaman Siddiqui. The pro-Musharraf Pakistan Mulim League also nominated a candidate, top party official Mushahid Hussain Sayed.
Members of the four provincial assemblies and two houses of the national parliament will elect a new president on Sept. 6.
A spokesman for Zardari welcomed Sharif's pledge not to destabilise the government.
"In a way, the coalition will remain intact," said the spokesman, Farhatullah Babar. "We still hope Mr Sharif will rejoin the coalition."
As the politicians bicker, militant violence has surged in Pakistan.
Pakistani Taliban gunmen attacked a district government official's home in the Swat Valley, northwest of Islamabad, on Monday, killing three family members and seven guards.
Signalling what could be a new Taliban tactic to undermine foreign forces in Afghanistan, gunmen in the port city of Karachi set fire on Sunday night to two armoured vehicles bound for U.S. forces in Afghanistan.
The violence and political uncertainty, on top of weak economic data, have undermined investor confidence and sent the country's financial markets sharply lower.
The Pakistani rupee closed at a record low of around 76.60/70 to the dollar on Monday. Shares were nearly 2 percent lower.
Pakistan's stock market, which rose for six consecutive years to 2007 and was one of the best-performing markets in Asia in that period, has fallen about 30 percent this year. (With additional reporting by Augustine Anthony and Kamran Haider; Writing by Robert Birsel; Editing by Myra MacDonald)