ISLAMABAD, Pakistan (CNN) -- Pakistani President Pervez Musharraf declared a countrywide state of emergency Saturday, suspending the constitution and dismissing the Pakistan Supreme Court's chief justice for the second time.
President Pervez Musharraf explains his actions in a televised address Saturday.
The country is at a critical and dangerous juncture -- threatened by rising tensions and spreading terrorism, Musharraf said in a televised address to the nation after declaring martial law.
He also warned Pakistan is going through "some very rapid changes."
Despite immediate condemnation from within and outside his country, he insisted his actions were for the good of Pakistan and the move was to stabilize unrest. Watch Musharraf's speech »
The Supreme Court declared the state of emergency illegal, claiming Musharraf -- who also is Pakistan's military chief -- had no power to suspend the constitution, Chief Justice Iftikhar Mohammed Chaudhry said.
Shortly afterward, government troops came to Chaudhry's office and told him the president had dismissed him from his job.
Justice Abdul Hameed Dogar was quickly appointed to replace him, according to state television.
It was the second time Chaudhry was removed from his post. His ousting by Musharraf in May prompted massive protests, and he was later reinstated. See a timeline of upheaval in Pakistan »
Musharraf was re-elected president in October, but the election is not yet legally official, because the Supreme Court is hearing constitutional challenges to Musharraf's eligibility filed by the opposition.
The next 5-year term is scheduled to begin November 15. Watch a former Pakistani P.M. call the developments in his country 'disturbing' »
Meanwhile, popular opposition leader Imran Khan said early Sunday that police surrounded his house in Lahore, barged in and told him he was under house arrest.
Musharraf also had Khan placed under house arrest during a government crackdown in March 2006.
Asked about Musharraf's actions Saturday, Khan said, "We are going to oppose this in every way."
"None of us accept ... this whole drama about emergency."
Khan said he believed Musharraf declared a state of emergency because he feared Pakistan's Supreme Court would rule against the results of the October election.
"Everyone knew that the general was in trouble with the Supreme Court," Khan said.
Former Prime Minister Benazir Bhutto -- who arrived in Karachi Saturday from Dubai, where she had gone to visit her family -- echoed that view. Watch crowds surround Bhutto upon her arrival »
Speaking outside her home, Bhutto described a "wave of disappointment" at Musharraf's actions.
"The country is going to dictatorship once again," she said. "It is an uncertain situation, and the Pakistani public and I are really very disappointed with this emergency announcement."
Bhutto -- who returned to Pakistan last month after several years in exile -- wants to lift her Pakistan People's Party to victory in January's parliamentary election in the hope she can have a third term as prime minister.
There was also swift international condemnation.
The White House called Musharraf's action disappointing.
"President Musharraf needs to stand by his pledges to have free and fair elections in January and step down as chief of army staff before retaking the presidential oath of office," said National Security Council spokesman Gordon Johndroe.
"All parties involved should move along the democratic path peacefully and quickly."
U.S. Secretary of State Condoleezza Rice -- who is in Turkey for a conference with Iraq and neighboring nations -- said The United States doesn't support any extra-constitutional measures taken by Musharraf.
In Britain, Foreign Secretary David Miliband said in a statement, "We recognize the threat to peace and security faced by the country, but its future rests on harnessing the power of democracy and the rule of law to achieve the goals of stability, development and countering terrorism. I am gravely concerned by the measures adopted today, which will take Pakistan further from these goals."
The nation's political atmosphere has been tense for months, with Pakistani leaders in August considering a state of emergency because of the growing security threats in the country's lawless tribal regions. But Musharraf, influenced in part by Rice, held off on the move. Watch a report on the volatile situation in Pakistan »
Since that time, Musharraf has faced a flurry of criticism from the opposition, who demanded he abandon his military position before becoming eligible to seek a third presidential term.
Musharraf, who led the 1999 coup as Pakistan's army chief, has seen his power erode since the failed effort to oust Chaudhry. His administration is also struggling to contain a surge in Islamic militancy. E-mail to a friend
All About Pervez Musharraf • Pakistan
Pervez Musharraf has invoked emergency rule in Pakistan according to state television. Independent stations have gone off the air.
Pervez Musharraf has ruled Pakistan since 1999
Reports say that police have surrounded the Supreme Court of Pakistan, while the judges are still inside. The court is deciding whether Musharraf was eligible to run in last month's election, which he won. The Supreme Court has stated that Musharraf does not have the authority to declare the state of emergency, which includes a suspension of the Constitution.

Former Prime Minister Benazir Bhutto, who recently returned home, is currently out of the country, visiting family in Dubai. 

''Dawn News'', a private television station in Pakistan had stated that sources said that a declaration of emergency rule was imminent. ''Dawn News'' and other private news organizations then went off the air. Some reports are also saying that land and cell lines into the capital are not functioning, but it is not clear if this is deliberate or is due to high traffic or some other concern. 

Most other countries have responded negatively to this news. The United States said that it was "disappointed" by the move while the United Kingdom's foreign secretary said that it was vital that Pakistan "abides by the commitment to hold free and fair elections on schedule".