Islamabad, Pakistan (CNN) -- Tens of thousands of Pakistanis ended their sit-in in central Islamabad late Thursday night after their leader, Muslim cleric Tahir ul Qadri, convinced Pakistan's government to dissolve the National Assembly and set new elections.
The cleric had repeatedly called for the government to be dissolved and replaced by a caretaker administration, with input from the judiciary and military.
Qadri, who convoyed into town with thousands of followers on Monday, reached the deal with a 10-man delegation from the governing coalition after five-hour negotiations in a bulletproof shipping container.
After Prime Minister Raja Pervez Ashraf signed off of the agreement, Qadri praised his supporters, including women and children, who braved frigid winter rains for their cause.
"In the history of Islamabad, such a sea of people, patient and driven and united, has never been seen" said Qadri, addressing the crowd outside his container. "You are victorious, and your sacrifices were worth it in the end."
The agreement, named the "Islamabad Long March Declaration," contains five main points:
First, the National Assembly must dissolve by March 16, so elections can take place within 90 days.
Second, Qadri's Pakistan Awami Tehreek party will be able to propose two potential candidates for the caretaker prime minister post.
Third, a meeting has been scheduled for January 27 to put together a national election commission.
Fourth, there will be a focus on electoral reforms, including ensuring "free, fair, just and honest elections guarded against all corrupt practices."
And finally, the government agreed not to pursue vendettas against any participants in Qadri's march or sit-in.
The crowds that had paralyzed downtown Islamabad since Sunday began to disperse after Qadri's declaration of victory.
He assured his supporters that transportation for their return home had been arranged and would be free of cost.
The cleric began his protest movement last month in the eastern city of Karachi after returning from years of self-imposed exile in Canada.
He originally had requested a personal meeting with President Asif Ali Zardari, and gave the head of state a 3 p.m. Thursday deadline.
The president never showed. Instead, the 10-man delegation arrived, according to Pakistan's Information Ministry.
Before Qadri met with the heads of coalition parties, four Cabinet ministers and other lawmakers, he warned his followers an agreement might not come quickly.
"You may need to sleep here another night, as we won't leave this place until there is a written agreement," he told the throngs.
Growing fury over widespread corruption brought the government district to a standstill this week and jolted Pakistan's already volatile political scene ahead of national elections due later this year.
The Supreme Court on Tuesday ordered the arrest of the prime minister and other officials in connection with a long-running corruption case.
Qadri's suggestion about judiciary and military involvement in Pakistan's future has raised concerns in the country, where military leaders have repeatedly seized power and ruled for long periods of time.
Qadri was a lawmaker during the presidency of former president, Gen. Pervez Musharraf.
Some Pakistanis have suggested Qadri may be working on behalf of the military. He denies those allegations.
The political drama unfolded against the backdrop of bomb and gun attacks in restive areas of the country carried out by the Pakistani Taliban and other militant groups.
At the same time, a string of recent clashes along the de facto border between Pakistan and India in the disputed territory of Kashmir has put renewed strain on ties between the two nuclear-armed neighbors.
Shaan Khan reported from Islamabad, with Mark Morgenstein writing in Atlanta. Nasir Habib also contributed to this report from Pakistan.