Asif Ali Zardari, the widower of former Prime Minister Benazir Bhutto, has been sworn in as Pakistan's president.
The inauguration follows Mr Zardari's sweeping victory in a presidential election by legislators on Saturday.
The polls were called after Pervez Musharraf resigned rather than risk being impeached.
Mr Zardari faces severe economic problems and a rampant Islamist insurgency that is threatening Pakistan's stability.
During Saturday's voting, a bomb killed at least 30 people near Peshawar city.
The inauguration serves as an opportunity for Mr Zardari to be internationally recognised, with guests such as Afghan President Hamid Karzai, the BBC's Barbara Plett in Islamabad says.
Repairing relations with neighbouring Afghanistan is just one the challenges facing the new president. Mr Karzai has accused Pakistan of not doing enough to stop militants crossing into Afghanistan to launch attacks.
Mr Zardari's son Bilawal - co-chairman of the Pakistan People's Party (PPP) - was in the audience, as were diplomats and politicians.
There were also high-ranking representatives of the military, which Mr Zardari and his party have often seen as their enemy, says our correspondent.
Sitting next to Bilawal were his two sisters Bakhtawar and Asifa and Benazir Bhutto's sister Sanam, who shed tears as the ceremony was about to begin.
Mr Zardari was greeted by applause and a fanfare as he entered the hall.
He swore allegiance to the constitution and to Islam, as the state ideology of Pakistan.
Afterwards there were cries of "long live Bhutto", a reminder, adds our correspondent that he achieved his position because he took over the leadership of the PPP due to his wife's assassination.
'Martyrs of democracy'
At a joint news conference with Mr Karzai after the inauguration, the two presidents promised to work together to solve the region's problems.
Mr Zardari paid tribute to his murdered wife, saying: "I accept the presidency of Pakistan in the name of... Benazir Bhutto. I accept this in her name and in the name of all the martyrs of democracy."
He said democracy had come full circle in Pakistan.
His greatest challenge, though, will be how to develop an effective policy to deal with the Islamist insurgency; and how to deal with an increasingly aggressive American ally, which has stepped up direct strikes against militant targets in Pakistan's border region, our correspondent says.
Pakistan's president is elected by secret ballots in the national and four provincial assemblies.
Mr Zardari won 481 votes out of 702, far more than the 352 votes that would have guaranteed him victory, leaving his two rivals trailing far behind.
Mr Zardari was thrust into the centre of political power by the killing of Ms Bhutto last December after which he became head of the PPP.
He is one of Pakistan's most controversial politicians.
For years he has been hounded by allegations of massive corruption - although he has never been convicted.
Former Prime Minister Nawaz Sharif took his PML-N party out of the governing coalition last month, accusing Mr Zardari of breaking key promises.
Many in Pakistan fear the country is facing a return to an old-style politics of confrontation.