"Congratulations, Mr. President," Chief Justice Abdul Hameed Dogar said after administering the oath to a solemn-looking Musharraf.
"I only hope that they will ... move forward toward a conciliatory, civilized, democratic and political environment in the future," Musharraf said.
However, neither was present at the ceremony in the state palace in Islamabad, and it remained unclear whether the changeover would defuse their threat to boycott upcoming parliamentary elections.
Such a move would undercut Musharraf's effort to legitimize his rule through a democratic ballot. However, the president appeared to return to his usual bullish self after blinking back tears as he ended his 46-year military career on Tuesday.
"This is a milestone in the transition of Pakistan to the complete essence of democracy," Musharraf told an audience of government officials, foreign diplomats and military generals.
"Anyone who is talking of any boycotts should hear this out: come hell or high water, elections will be held on Jan. 8. Nobody derails it."
Musharraf again sought to justify his imposition of emergency rule on Nov. 3, after which he purged the Supreme Court just as it was about to issue a verdict on the legality of his continued rule. The retooled court last week gave its stamp of approval.
However, he gave no indication of when the emergency would be lifted a key demand of both his domestic rivals and international backers, including the United States.
He accused former Chief Justice Iftikhar Mohammed Chaudhry of involvement in a "well thought-out conspiracy" to derail his "noble intentions" to become a civilian president and guide Pakistan back toward democracy.
"I had to act, and I acted in the interests of Pakistan," he said.
Musharraf said that stepped-up military action had "broken the back of the spread of terrorism" in the northwest.
Still, a military spokesman said five soldiers died and four were injured in the region on Thursday when a roadside bomb exploded next to a passing convoy.
In the eastern city of Lahore, street clashes broke out between police and lawyers protesting against Musharraf's inauguration. Four lawyers and three officers were injured, police said.
About 200 demonstrators chanting "Go, Musharraf, go!" and "Friends of Musharraf are traitors" flung bricks and sticks at policemen who blocked their path as they tried to march from one court complex to another, according to an Associated Press reporter at the scene. Police picked up the missiles and threw them back.
Musharraf was the army's commander in chief when he seized power from Sharif in a bloodless coup in 1999. He retained the post for the past eight years and the army which has ruled Pakistan for more than half of the country's 60-year history has remained his main power base throughout.
On Wednesday, he finally ceded command to a hand-picked loyalist, Gen. Ashfaq Kayani expected to maintain the army's effort against Islamic militants.
"I am sure Pakistan will grow stronger with me as civilian president and Gen. Kayani as army chief," Musharraf said.
Opposition politicians reacted to Musharraf's speech by urging him to immediately lift emergency rule, restore the constitution and restore Chaudhry and other independent-minded judges.
"This is a must," said Qazi Hussain Ahmad, the head of a six-party coalition of Islamic groups.
Sadique al-Farooq, a senior leader of Nawaz Sharif's party, said he hoped Gen. Kayani would "learn lessons from the mistakes of Musharraf, and will never think of indulging in politics."
However, Fazlur Rehman, another Islamist leader, said the country's opposition parties were undecided on whether to contest the parliamentary elections.
In Washington, President George W. Bush praised Musharraf for keeping his word and relinquishing his military post, calling it a "strong first step" toward enhancing democracy in Pakistan.
"It is something that a lot of people doubted would ever happen," Bush said in an interview Wednesday with CNN's "The Situation Room."
Bush added that "in order to get Pakistan back on the road to democracy, he's got to suspend the emergency law before elections."
European Union foreign policy chief Javier Solana said Musharraf's transition to civilian president was "a step in the right direction."
"The early lifting of the state of emergency and restoration of the constitution will be crucial to ensure free and fair elections," Solana said.
But the Western diplomats listening to Musharraf on Wednesday got a stinging rebuttal of their criticisms.
"I personally feel that there is an unrealistic and maybe an impractical or impracticable obsession with your form of democracy, with your form of human rights, civil liberties," Musharraf said, claiming to speak for developing countries everywhere.
Pakistan wanted to attain those goals, but would need time and support to reach standards that others had built over centuries, he said.
"We will do it our way as we understand our society, our environment better than anyone in the West," he said, drawing a burst of applause.
"My promise to this nation, to this country, for the coming years, is that I will take all actions each and every action on the basis of: Pakistan comes first."
The body of Saudi journalist Jamal Khashoggi was found in a well on the territory of the residence of the Saudi Consulate General in Istanbul
The month of October was rich with rare astronomical phenomena.