Pakistan's Prime Minister Yusuf Raza Gilani in a speech on national television just before sunrise on Monday announced Iftikhar Mohammad Chaudhry's restoration as chief justice of the supreme court effective March 22.
"We are committed to democracy and we will take all steps to promote democracy in our country," Gilani said.
The prime minister's announcement finally confirmed news attributed to government officials earlier in the night, that the government had decided to restore Chaudhary, to quell further unrest with a large protest in Chaudhry's support, planned in Islamabad, the Pakistani capital, on monday.
The move to reinstate Chaudhary as the chief justice followed a, Pakistan's second largest city with a reputation of being the country's political nerve centre.
Nawaz Sharif, former prime minister and the main leader of the opposition to president Asif Ali Zardari, led thousands of protestors on the streets of Lahore on Sunday. Stone-throwing protestors clashed with policemen armed with tear gas and batons, creating one of the worst days of unrest in recent memory.
President Asif Ali Zardari who until Sunday morning was believed to have taken a strong stand in resisting Chaudhary's return, by Sunday night had agreed to his comeback, mainly to prevent a recurrence of the violence in Lahore being repeated elsewhere in the country.
On Monday, protesting lawyers and opposition activists had planned an indefinite sit-in in central Islamabad to press the government for Chaudhry's return, taking the protests to the country's capital.
A senior Pakistani government official who spoke to CBS News and confirmed the decision to reinstate Chaudhry, said, Zardari changed his position partially under pressure from the U.S. as well as Pakistan's own influential military.
In the past three days, Pakistani officials said, U.S. Secretary of State Hilary Clinton and Ambassador Richard Holbrooke, President Obama's special envoy on Pakistan and Afghanistan, had spoken to Zardari, urging him to be more conciliatory towards his opponents.
Since Friday, General Ashfaq Pervez Kiyani, the chief of staff of Pakistan's army, also became involved in the crisis, holding meetings with Zardari and Pakistan's Prime Minister Yusuf Raza Gilani, urging them to soften their government's stand.
"This is a major shift in the government's position" said a senior western diplomat in Islamabad who spoke to CBS News on condition of anonymity. One major question going forward is Zardari's own future, faced with humiliation as he retreated on Chaudhry's issue. Since his election as president in September last year, he has tried to woo the U.S. to accept him as a credible, long term partner.
The Western diplomat who spoke to CBS News said much depends on Zardari's ability to prevent his opponents including Sharif from ganging up against him. His additional challenge is that of keeping his position intact as head of the ruling Pakistan People's Party (PPP). "If Zardari survives and is able to retain his hold over the ruling party, the U.S. will of course still want to deal with him," said the diplomat.