Pakistani President Pervez Musharraf has been sworn in for a second term, this time as a civilian ruler, calling it a "historic day" for the country.
Mr Musharraf called for "political reconciliation" and insisted polls for parliament would go ahead in January.
As he was being sworn in, about 200 lawyers opposed to his rule clashed violently with police in Lahore.
On Wednesday, Mr Musharraf stepped down as commander of the military amid heavy domestic and international pressure.
Correspondents say there will be more stiff challenges to his leadership in the weeks ahead, following his imposition of emergency rule on 3 November.
'Protect and defend'
Pervez Musharraf won a second term as president in a legislative election on 6 October, the legitimacy of which has been hotly contested.
For Thursday's ceremony, the president arrived in a black traditional suit (sherwani) instead of a military uniform.
The ceremony began with the playing of Pakistan's national anthem and a recitation from the Koran.
He read out an oath to "preserve, protect and defend the constitution of the Islamic Republic of Pakistan", ending it with "May Allah, God Almighty, help and guide me".
After the swearing-in ceremony, Mr Musharraf said he would "break convention and take the opportunity to give my views on the present situation in Pakistan".
Mr Musharraf, who took power in a bloodless coup in 1999, said he welcomed the return of opposition leaders Benazir Bhutto and Nawaz Sharif to Pakistan.
"I personally feel this is good for the political reconciliation I have spoken of," he said.
Mr Musharraf also insisted that parliamentary elections would be held on schedule in January "come hell or high water".
"They will not be derailed," he said, adding that the polls would be free and fair and open for monitoring by international observers.
Opposition parties have threatened to boycott the election.
Mr Musharraf said he was in favour of democracy and human rights, "but we will do it our way, in our time. We understand our society, our environment, better than anyone in the West".
The president, who is scheduled to address the nation at 2000 (1500 GMT), gave no indication when emergency rule would end.
The presidential oath for another five-year term was administered by Chief Justice Abdul Hamid Dogar.
He replaced Iftikhar Chaudhry, who was sacked when he and other judges refused to endorse emergency rule.
In his speech, Mr Musharraf accused Mr Chaudhry of conspiring to "derail democracy".
In Lahore, protesting lawyers threw stones and police tried to clear them with baton charges. About a dozen lawyers were injured.
Syed Mohammad, president of the Lahore bar association, said: "Our battle is to block military intervention forever."
A day earlier, Mr Musharraf had quit as army chief, handing the title over to Gen Ashfaq Pervez Kayani at a ceremony in Rawalpindi, Pakistan's main garrison town.
Opposition leader Benazir Bhutto welcomed that move but said her party was "not in a hurry" to accept Mr Musharraf as a civilian president.
US President George W Bush called the Pakistani leader "an absolute reliable partner".
But he told CNN that Mr Musharraf would have to end emergency rule before the elections on 8 January "in order to get Pakistan back on the road to democracy".
The BBC's Barbara Plett in Islamabad says the civilian investiture does not mean an end to Mr Musharraf's difficulties.
The state of emergency has alienated much of the secular middle class, while an Islamist insurgency has also gained strength under his rule, she says.
If his opponents join forces against him, he could be in real trouble, our correspondent says. If not, he might be able to play them off against each other. Either way, the president will continue to struggle with the political crisis.