ISLAMABAD, Pakistan - Pakistan's Supreme Court on Friday reinstated three judges ousted by Pervez Musharraf, cementing political divisions in the country a day before it elects a new president.

Musharraf's purge of the court last year deepened his unpopularity and helped his political foes to a victory in February elections. Musharraf resigned under pressure last month.

However, the second-largest party then quit the ruling coalition over the failure to restore all the judges -- including the ousted chief justice, Iftikhar Mohammed Chaudhry.

Tassadiq Hussain Jillani, Shakirullah Jan and Syed Jamshed Ali were sworn back into the court at a ceremony Friday.

Law Minister Farooq Naek said Chaudhry was also welcome to take a fresh oath, but said he could not return as chief justice because removing the judge who replaced him could trigger a "constitutional impasse."

"There cannot be two chief justices," Naek told reporters at the court.

The move deepens the rift between the ruling Pakistan People's Party of Asif Ali Zardari, the front-runner to become president in a vote by lawmakers on Saturday, and that of former Prime Minister Nawaz Sharif.

Zardari has countered calls to restore the judges by arguing that it would require constitutional amendments to untangle a legal mess bequeathed by Musharraf.

But Zardari also appears wary of Chaudhry, who stood up to Musharraf and questioned a pact signed by the former military ruler that quashed long-standing corruption charges against Zardari and his slain wife, former Prime Minister Benazir Bhutto.

Zardari has accused Chaudhry of "playing politics" and called for sweeping judicial reforms expected to crimp the ability of the court to check the activities of the government.

He has dismissed as naive the country's lawyers movement, whose yearlong protests undermined Musharraf and turned Chaudhry into a figurehead for a burgeoning pro-democracy movement.

Sharif has argued that because the judges were illegally removed, the government could restore them all through a simple order. Pervaiz Rashid, a Sharif aide, said the return of the three judges on Friday amounted to validating Musharraf's crackdown.

"Whether they restore three or 300 judges, the way they are doing it, it doesn't change our stand," he said. "We do not believe in any judiciary without the reinstatement of Justice Chaudhry."

The fate of the judges is also important to Musharraf, who has played down suggestions he will be forced into exile by threats from Sharif to have him tried for treason.

Musharraf imposed emergency rule last November in order to purge the court and halt legal challenges to his plan to stay on for another five years as president.

The retooled court issued orders granting him immunity from prosecution for a crackdown that Musharraf himself admitted was unconstitutional.

The government already changed a law lifting the maximum number of judges in the Supreme Court from 16 to 29 -- meaning none of the judges who issued those protections will have to make way for any who return.

Zardari, generally considered pro-Western, isn't expected to change Pakistan's commitment to be an ally in the U.S. war on terrorism, despite a bold cross-border U.S.-led raid that left at least 15 people dead in the country's largely lawless tribal belt along the Afghan frontier.

The raid Wednesday sparked widespread condemnation of what was seen as an attack on the country's sovereignty.

In news likely to stoke more anger, intelligence officials said a missile strike was suspected in a blast Thursday that killed at least four people in North Waziristan, part of the tribal belt where Osama bin Laden and his deputy are thought to be hiding. Similar strikes in the past have been blamed on the U.S.

On Friday, an explosion possibly caused by a missile strike killed five suspected foreign militants near the Afghan border, two Pakistani intelligence officials said, citing local informers.

The officials asked for anonymity because they were not authorized to speak publicly.

Army spokesman Maj. Gen. Athar Abbas confirmed the explosion and said the military had sent a team to investigate what had happened.

Zardari criticized Wednesday's raid, the first known foreign ground assault inside Pakistan against a suspected Taliban haven. But he also expressed sympathy for the U.S. and other countries that have been hit by terrorist attacks, saying Pakistan also is suffering from extremist violence.