ISLAMABAD, Pakistan — Pakistan's Supreme Court, filled with supporters of the president, Gen. Pervez Musharraf, after he imposed emergency rule on Nov. 3, dismissed on Monday the main challenges to his re-election, all but ensuring his confirmation to another term by the court later this week.

The ruling is the first step in a plan laid out by Musharraf ahead of parliamentary elections he wants to hold in January. In an interview last week, he said that he would resign as chief of the country's military after the court cleared all the challenges to his re-election, and he has repeatedly said that he would take the oath of president as a civilian.

The general swept to victory on Oct. 6 in an election boycotted by most of the opposition parties, but the Supreme Court's original judges ordered that the results not be officially confirmed until they had heard all challenges by other candidates.

Also on Monday, Musharraf's office announced that he would make a two-day state visit to Saudi Arabia beginning Tuesday. He has made few excursions outside the country in recent months. The destination of Saudi Arabia raised speculation here in the capital because Nawaz Sharif, a former prime minister and popular opposition leader, is in exile there, after being deported from Pakistan for a second time in September.

It was Sharif whom Musharraf overthrew in 1999 when he seized power in a coup, and he has since been the general's most uncompromising critic. Diplomats suggested that Musharraf was making the trip to ensure that the Saudi government would keep his chief rival there and not allow him to leave for Pakistan before the elections. Should he return, Sharif would represent a serious political threat to both the party of the opposition figure Benazir Bhutto and the party that backs Musharraf.