Pakistani ministers held talks on Thursday with a cleric leading a mass protest in Islamabad in an attempt to avert a political crisis and disperse a rally that has heaped pressure on the fragile government.
The adjournment by the Supreme Court of an alleged corruption case against Prime Minister Raja Pervez Ashraf, after officials claimed not to have enough evidence to arrest him, also seemed to give the government breathing space.
Pakistan has been weakened by a poor economy, resurgent Taliban violence, record sectarian unrest, a dire energy crisis and even fledgling peace gains with India have appeared in jeopardy following five recent cross-border killings.
Tension had been at fever pitch since Tuesday, when the court ordered Ashraf's arrest and cleric Tahir-ul Qadri arrived in Islamabad with tens of thousands of supporters, denouncing politicians and praising the armed forces and judiciary.
The timing sparked panic about a rumoured judiciary-military plot to derail elections due by mid-May. The polls, if on schedule, would be the first democratic transition between two civilian governments in Pakistan's history.
But Qadri signalled that Thursday would be the last day of his sit-in outside parliament and invited the government to last-ditch talks.
At around 4pm (1100 GMT), a delegation of cabinet ministers and members of the coalition entered the bullet-proof container, where Qadri has been holed up since early Tuesday while his supporters have slept on the ground outside.
Information Minister Qamar Zaman Kaira said the talks would try to resolve the situation, which has paralysed the main commercial avenue in Islamabad.
The crowd, which has braved cold weather and heavy rain, broke into cheers and danced in the street at news of the dialogue. Many were shivering.
"I'm hopeful that the protest will put ample pressure on the government to announce electoral reforms and a clear date for the next election," said Ajmal Karim, in his mid-20s.
Qadri wants parliament dissolved immediately and a caretaker government set up in consultation with the military and judiciary to implement reforms to facilitate free elections.
His sudden -- and apparently well-financed -- emergence after years living in Canada has been criticised as a ploy by sections of the establishment, particularly the armed forces, to delay the elections and regain power.
The government has previously said that parliament will disband in mid-March to make way for a caretaker government, set up in consultation with political parties, and elections within 60 days -- sometime by mid-May.
President Asif Ali Zardari, who has sat out the protest in Karachi, ordered parliament to convene on January 21.
Analysts said the government appeared to have ridden out any immediate danger and that announcing a precise date for elections could resolve the matter.
"I think that the new elections are the only option now," retired general and political analyst Talat Masood told AFP.
"I think the government will sail through the current situation. Tahir-ul Qadri needs a face-saving solution and they are talking to him to give him that."
Chief Justice Iftikhar Muhammad Chaudhry adjourned until January 23 the case being heard against Ashraf and 15 others accused of corruption over power projects that date back to his time as water and energy minister.
Chairman of the National Accountability Bureau Fasih Bokhari said it would take time to find evidence to prosecute anyone despite the court ordering in March 2012 legal proceedings against Ashraf.
Political analyst Hasan Askari warned that it was only a temporary reprieve.
"Even if they come up with a solution to the present problems, they may get another crisis... So the government should announce elections now," he said.