Pakistan's President Pervez Musharraf has defended his decision to declare emergency rule, saying he could not allow the country to commit suicide.
He said Pakistan was in a crisis caused by militant violence and a judiciary which had paralysed the government.
The moves came as the Supreme Court was due to rule on the legality of Gen Musharraf's October election victory.
Early on Sunday the acting head of the party of the exiled former Prime Minister Nawaz Sharif was arrested.
"Musharraf's days are numbered. Time has come to end the political role of the army," said Javed Hashmi of the Pakistan Muslim League (Nawaz), before he was taken away by police in the central city of Multan.
As the state of emergency was imposed, the chief justice was replaced and the Supreme Court surrounded by troops.
The court was to decide whether Gen Musharraf was eligible to run for re-election last month while remaining army chief.
The BBC's Barbara Plett reports from Islamabad that fears had been growing in the government that the Supreme Court ruling could go against Gen Musharraf.
It is not clear whether the parliamentary elections due in January will go ahead. Gen Musharraf made no mention of them in his speech, but he insisted he wanted to restore democracy.
Pakistan has been engulfed in political upheaval in recent months, and the security forces have suffered a series of blows from pro-Taleban militants opposed to Gen Musharraf's support for the US-led "war on terror".
In a lengthy televised speech late on Saturday, Mr Musharraf said the situation had forced him into making "some very painful decisions".
"I suspect that Pakistan's sovereignty is in danger unless timely action is taken," he said.
He insisted his decisions were made for the benefit of Pakistan.
"Extremists are roaming around freely in the country, and they are not scared of law-enforcement agencies," the president said.
As well as defending emergency rule to the Pakistani people, Gen Musharraf also appealed directly to his Western allies for patience.
"Kindly understand the criticality of the situation in Pakistan and around Pakistan. Pakistan is on the verge of destabilisation," he said.
"Inaction at this moment is suicide for Pakistan and I cannot allow this country to commit suicide."
Former Prime Minister Benazir Bhutto, who recently returned to the country after years of self-exile to lead her party in planned parliamentary elections, was in Dubai on a personal visit when news of the declaration broke.
However, she immediately flew back to Karachi where she condemned Gen Musharraf's decision, saying emergency rule had been imposed so elections could be avoided.
"We the political parties are calling for the restoration of the constitution, and for the holding of the elections under an independent election commission," she told the BBC.
She said the international community should use its influence with Gen Musharraf to "press him on the restoration of the constitution, the reinstatement of the judges and the release of the political prisoners".
Another politician, former cricketer Imran Khan, said he had been placed under house arrest.
He blamed the increasing extremism in Pakistan on Gen Musharraf, saying: "When you stop all legal and constitutional ways of people challenging [the president], then the only ones who challenge him are people with a gun".
US Secretary of State Condoleezza Rice said the declaration of emergency rule was "highly regrettable" and called upon Pakistan to have free and fair elections.
UK Foreign Secretary David Miliband also expressed concern, saying it was vital Pakistan's government "abides by the commitment to hold free and fair elections on schedule".
Gen Musharraf's address echoed the text of the declaration of emergency rule, which opens with a reference to the "grave threat" posed by the "visible ascendancy in the activities of extremists and incidents of terrorist attacks".
It ends by saying that the constitution is in "abeyance" - which, according to our correspondent, in effect means that martial law has been imposed, although there is not a heavy security presence on the streets.
The political and judicial core of Islamabad has been shut down, but the rest of the city is functioning normally, our correspondent says.
Shortly after emergency rule was declared, all private news channels were taken off the air and tough restrictions have been imposed on the media.
Statements that defame Gen Musharraf, the military or the government are prohibited and statements or pictures from Islamist militants are banned from broadcast or publication.
Our correspondent says it is clear from reading the emergency proclamation that the main target is the judiciary which is accused of interfering in government policy and weakening the struggle against terrorism.
Chief Justice Iftikhar Chaudhry and eight other judges refused to endorse the emergency order, declaring it unconstitutional, resulting in Mr Chaudhry's dismissal.
A new chief justice has been appointed, officials say. He is Supreme Court judge Abdul Hameed Dogar, a supporter of Gen Musharraf who was a member of the special tribunal appointed to investigate allegations of wrongdoing by Mr Chaudhry.
Ms Bhutto's return from self-imposed exile last month came about with the co-operation of Gen Musharraf.
Our correspondent says that in the changed circumstances she will have to decide whether she is returning to lead the opposition against the president, or should wait on the sidelines in the hopes of securing an agreement with him. ( BBC )