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".
New chief justice
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.
Benazir Bhutto returned to Pakistan in response to the news
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.
Are you in Pakistan or do you know people there? How has the state of emergency affected you?
I was playing pool with a couple of friends when we received the news that Musharraf had declared a state of emergency. A friend of mine working as an investment banking analyst feared that his deal with some foreigners could be jeopardized due to the imposed state of emergency.
A revolutionary friend of mine playfully said let's go out and gather folks and start protesting. Another friend called in and asked what my plans were for the night and whether I would like to go for a coffee.
I was to a certain extent deeply disgusted with how the state of affairs were shaping. "1 Step ahead 10 Steps backward" murmured a voice inside my ahead.
The situation in Lahore seems perfectly normal. People were still enjoying their behari kebabs and their Subways.
Woke up to a sunny morning with no chants or slogans or protests. Private TV channels continue to remain closed and most of the news we have been getting has been through the Dawn daily which just arrived a few hours ago.
A good college friend Osman currently residing in London once stated that the CJ [Chief Justice] was a turning-point in the history of Pakistan when a few other friends attacked him for being totally unrealistic and saying all things came back to the same end with the same hoodlums, cheats and thieves being voted in.
On a personal level, though not a revolutionary, I feel deeply violated. The CJ presented a flicker of hope. A true return to democracy was in the offing. Yet in the "Supreme Interest of the Nation" an individual of the Supreme Institution of Pakistan was placed under house arrest taking us back to square 1.
How do the events unfold? Do I see massive protests, I cannot really say since people are continuing their lives as usual feeling helpless to control the state of affairs. The government changes retrogressive sales tax (which hurt the lower end of society) to the public and yet is unaccountable to them. What a transition to democracy we are under.
Nabeel Khan, Lahore, Pakistan
I am just going to the airport to get a flight to Pakistan (Karachi then Lahore). I was speaking to my colleagues in Lahore last night and they were saying that life goes on and all is nice and peaceful. I took a long hard decision last night about whether to go or not but they are right life does go on and I am looking forward to my seventh visit in 5 years. I just pray that everyone in Pakistan stays safe.
I am staying at Serena hotel in Islamabad. All the news channels on TV are still off, some replaced by others. BBC for instance is replaced by a Russian sports channel since this morning.
I know many people couldn't take food when they got to know that Musharraf had imposed emergency and the worst was, he suspended Chief Justice Iftikhar Chaudhry. People around me are frustrated and soon you will see the reaction.
A Iftikhar, Karachi
I heard the news on my way to a movie and honestly speaking I'm pretty indifferent to the whole thing. The people have no say in the political process in Pakistan. The elections have never been free nor fair. People have simply stopped caring.
Haroon Afzal, Karachi, Pakistan
I have family in Karachi and we are leading normal lives going about our daily work, parties, schools and all, a few changes like more uniformed men and barriers not a big problem, in fact most of us are glad that Musharraf took this action, he should have done this earlier... If any Pakistani leader is to be trusted with leadership it is Musharraf, not traitors and looters...
I recently graduated in electrical engineering from Comsats Islamabad and got a job after a long struggle in one of the telecom companies here in Islamabad. I am hired on the basis that they are starting a new project in NWFP and FATA areas. After this emergency declaration company is now thinking to cancel the project in that area for which I was hired for, as NWFP and FATA areas are prime hiding places for Taliban... Now my job is in jeopardy and don't know what my future holds for me.....
Luqman Azam Cheema, Rawalpindi Pakistan
I'm in Pakistan and everything is quite normal here. Being honest, these political situations are of no more interest to the public, as apparently we can't do anything. Everyone is waiting for a good time. The imbalance of forces brings every day like an emergency, so it doesn't affect the local public, but yes who knows about political ones? Hee hee. They must be planning coz they are really affected.
Muhammad Ali Khan, Lahore
It is the time of shame for Pakistan. Martial law not new for Pakistan. I heard news when I was in my evening CIMA class. I was shocked our class was stopped and college was closed within 25 min. Street was full of police. It was like war. Everyone was rushing to home. I called my mom and brother and said not to go near any government dep. I was having great problems to get public transport. It was nowhere to be seen. I have to walk 5km to reach home. Most supermarkets were closed. There were queues outside the small shops. City was at a halt.
Raveem Zafar, Lahore, Pakistan
So far everything is normal. I was invited to posh restaurant in Karachi and it was packed for dinner. By that time emergency was already imposed and people are quite relieved at this war between judiciary and Musharraf. He is a winner since he has the most powerful army behind him. At least things will move now.
Irfan Younas, Karachi, Pakistan
I heard the news when I was sitting with my friends in a restaurant and was having dinner. During dinner I had to call to one and he gave me news over phone that emergency has been announced in Pakistan. I was shocked and extremely disappointed. So are all of my friends as well who were sitting with me.
We are all Pakistanis and of course very much concerned about what's going on in Pakistan. We are all professionals and, well, mature people with broad vision and exposure, and we truly disliked the decision of Pervez Musharraf. Then when I came back home I saw the same reaction of my family that they were highly disheartened and were sad like something has happened within the family...
Mansoor Javed, London