* Weeks of anti-government protests demanding Sharif resign
* Violence erupts late on Saturday, at least three deaths
* Army holds emergency meeting to discuss crisis (Adds army statement, details)
By Syed Raza Hassan and Mehreen Zahra-Malik
ISLAMABAD, Aug 31 (Reuters) - Pakistan's powerful army said on Sunday any further use of force to resolve an escalating political crisis would only worsen the situation, after weeks of protests demanding Prime Minister Nawaz Sharif's resignation turned violent.
Peaceful anti-government demonstrations spilled over into deadly confrontation overnight after thousands of protesters tried to storm Sharif's residence. Police responded with teargas and rubber bullets. At least three people were killed and more than 200 wounded, further angering protest leaders.
Activists demanding Sharif's resignation have camped outside government offices for more than two weeks but it was the first time violence broke out as protesters, some armed with sticks and wearing gas masks, tried to break through police lines.
Army chiefs held an emergency meeting in the garrison city of Rawalpindi on Sunday night to discuss the crisis, prompting speculation that the military could take decisive action to end the crisis in a nation where power has usually changed hands via coups rather than elections.
But in a brief statement, the army reaffirmed its commitment to democracy and said the crisis had to be solved politically.
"Further use of force will only aggravate the problem. It was once again reiterated that the situation should be resolved politically without wasting any time and without recourse to violent means," it said.
Small skirmishes continued into Sunday, with police occasionally firing teargas, but the crowd massing outside parliament appeared peaceful on Sunday night, with some dancing or sleeping on the grass.
Smaller protests were also reported in the city of Lahore, Sharif's political power base, and other parts of Pakistan.
How the crisis ends and whether Sharif survives ultimately lies in the military's hands in a country ruled by generals for half of its history.
With tensions rising, last week the army said it was asked by the government to help defuse the crisis but has so far not directly intervened. It was unclear how the deadlock could be resolved with the opposition flatly refusing to leave the streets until Sharif quits.
Sharif, who swept to office last year in Pakistan's first democratic transition of power, has resisted calls to resign while agreeing to meet other demands such as an investigation into suspicions of fraud during last year's election.
His office reiterated on Sunday evening that his resignation was out of the question.
"It was agreed that this undemocratic onslaught should be withdrawn and parties should come back to the negotiation table," his press office said in a statement after Sharif chaired a meeting with his top officials.
Protests led by Imran Khan, a renowned cricketer before entering politics, and fiery cleric Tahir ul-Qadri, erupted in the capital Islamabad on Aug. 15 and talks to find a negotiated solution have repeatedly failed.
"I am prepared to die here. I have learnt that government plans a major crackdown against us tonight," Khan told his supporters. "I am here till my last breath."
Khan told the cheering crowd to challenge security forces protecting the parliament and the prime minister's house.
"The way you stood up last night, you have to stand up today also," he said. "We will face them and make them run away this time."
Despite his fiery rhetoric, there were no signs the crowd was preparing to march on government buildings again.
Ousted from an earlier stint in office in a coup in 1999, Sharif still has a difficult relationship with the army.
Even if he rides out of this crisis, Sharif is likely to remain significantly weakened for the rest of his tenure and sidelined on key issues such as foreign policy and security.
Qadri, who has rallied thousands of his own supporters alongside those of Imran Khan, said protests would not subside unless Sharif resigned.
"State atrocities have reached their peak," he told his supporters, standing on top of a shipping container. "Imran Khan and Dr. Qadri are fighting this war together." (Additional reporting by Sheree Sardar and Mubasher Bukhari; Writing by Maria Golovnina; Editing by Rosalind Russell)