Nawaz Sharif, Pakistan's former prime minister, has agreed to join the late Benazir Bhutto's party in a coalition government.
Bhutto's Pakistan People's Party (PPP) won the most seats in a February 18 general election, but not enough to rule alone.
Sharif's Pakistan Muslim League (PML-N) won the second-most seats.
"It was also agreed that the PML (N) shall be part of the federal cabinet," Sharif told a news conference on Saturday after talks with Bhutto's widower, Asif Ali Zardari, who took over as PPP leader after she was assassinated on December 27.
Zardari and Sharif also formally signed an agreement.
Sharif had not previously confirmed his party would join the PPP in forming a government.
Sharif, reading from the joint declaration, said: "The coalition partners PPP and PML-N undertake to form coalition partnership together for a democratic Pakistan, for translating the mandate given by the people of Pakistan to the democratic forces through the February 18, 2008 elections.
"The leadership was of the firm opinion that the coalition partners are ready to form the government and the national and provincial assemblies should be convened immediately."
Judges issue
The two parties urged Pervez Musharraf, the Pakistani president, to convene parliament without delay and said the legislative body would restore judges ousted under a state of emergency.
Kamal Hyder, Al Jazeera's correspondent in Pakistan, said: "Both sides have reiterated that they are going to be talking about the restoration of the judiciary within 30 days after the parliament is convened.
"There has been some confusion as to when parliament will be convened - that is the privilege that the president will have to exercise and so far he has said it will be another two weeks."
The dismissed judges, including the supreme court chief justice, were seen as hostile to Musharraf's October re-election by legislators for a new five-year term as president while he was still army chief.
The judges are likely to take up legal challenges against Musharraf if they are restored.
Hundreds of lawyers across the country, meanwhile, launched a week of protests to press for the restoration of the judges.
It was a year ago on Sunday that Musharraf suspended the then chief justice, Iftikhar Chaudhry.
Witnesses said police fired teargas at the demonstrators in Islamabad, while both sides threw stones at each other.
The protesters, including lawyers, political party workers and civil society activists, were stopped by riot police at the barbed barricade erected outside Chaudhry's residence.
PHOTO CAPTION
Former prime minister Nawaz Sharif (R) welcomes widower of slain leader Benazir Bhutto and co-chairman of her party Asif Zardari at his residence in Muree near Islamabad March 9, 2008.
Al-Jazeera