Pakistan freed thousands of lawyers and opposition activists held under emergency powers on Tuesday, as President Pervez Musharraf arrived in Saudi Arabia, where old foe Nawaz Sharif lives in exile.

Army chief General Musharraf has been under pressure from the opposition and Western governments to revoke the emergency rule imposed on November 3 and ensure elections in January are held under free and fair conditions.

In a sign that the emergency was being relaxed, Interior Ministry spokesman Javed Iqbal Cheema announced around 3,400 detainees had been released by Tuesday and some 2,000 more would be released soon.

Increasingly isolated at home, Musharraf flew to Saudi Arabia leaving a trail of speculation that he would reach out to Sharif, the prime minister he deposed in a 1999 coup, who is now living in exile in the Saudi city of Jeddah.

Musharraf was accompanied by Lieutenant-General Nadeem Taj, head of the Inter-Services Intelligence. Musharraf was expected to stay in Riyadh for a few hours before going to Jeddah on his way for a pilgrimage to Mecca.

The sudden visit raised speculation that Musharraf could turn to Sharif as prospects for a post-election power sharing deal with Benazir Bhutto, another former prime minister, have receded.

Musharraf is in big trouble, and I don't think Nawaz Sharif will agree to support him, said Noor Ellahi, 55, owner of a roadside restaurant in the southern city of Karachi.

The only option left with Musharraf is probably Benazir Bhutto, but that too is very difficult.

Sharif told Reuters from Jeddah on Monday he would not meet Musharraf unless the emergency was rolled back, and he had rebuffed approaches for a meeting in the last 2-½ months.

BECOMING CIVILIAN PRESIDENT

The Election Commission announced on Tuesday that parliamentary polls would be held on January 8, the date chosen by Musharraf, but the unpopular military leader has been warned the election will lack credibility if the emergency remains in place.

Opposition parties are considering whether to boycott the election as none of them expect it to be free or fair.

Political uncertainties were reflected on the Karachi stock market index, which closed up 0.6 percent on Tuesday, still around 4.5 percent below its pre-emergency levels and 11 percent off a life high struck on October 22.

Najam Sethi, editor of the Daily Times, believed Musharraf went to Riyadh to ask the Saudi authorities to guarantee Sharif's exile until at least after the election.

The last thing he wants is Nawaz Sharif coming back in this highly charged environment, said Sethi, who believes Musharraf's best bet for support lay with Bhutto.

Musharraf let her return to Pakistan last month without fear of prosecution in graft cases she says were false.

On Monday, the Supreme Court, packed with government-friendly judges, struck down five challenges to Musharraf's re-election last month. The last one will be heard on Thursday.

Once the court clears the way, Musharraf has promised to step down as army chief and take the oath as a civilian president.

Musharraf has used the emergency to purge the court of judges who might have annulled his re-election. One of Sharif's key demands is restoration of the judiciary.

ARMY OPERATION

Some of the most prominent opposition figures, including lawyer and former minister Aitzaz Ahsan and cricketer-turned- politician Imran Khan, were still in custody.

While peaceful protests are a part of democratic process, the federal and provincial governments shall not brook any attempt to create disturbances in the run-up to elections, Interior Ministry spokesman Cheema said.

Riot police used batons to break up a protest by journalists against media curbs in the southern city of Karachi, arresting around 100.

We are fighting for freedom of speech and democracy. Being arrested does not scare us and cannot stop us, said Akbar Jaffrey, a reporter for Sindh TV, as he was taken away.

Western governments fear that stifling democracy could play into the hands of Islamist militants threatening to destabilise nuclear-armed Pakistan, but they don't want to undermine a moderate Muslim leader who has been crucial to fighting al Qaeda.

The army has launched an operation in Swat, a valley in northwest Pakistan, to crush a militant movement sympathetic to Osama bin Laden's cause. Troops killed 15 Islamist fighters on Tuesday, while four villagers were killed by a mortar bomb. Casualties have risen to nearly 300 since late October.