Asif Ali Zardari, the widower of former Prime Minister Benazir Bhutto, has won a sweeping victory in Pakistan's presidential election.
The election was called after Pervez Musharraf resigned rather than risk being impeached.
Mr Zardari faces severe economic problems and an Islamist insurgency. During the voting, a bomb killed at least 15 people near Peshawar city.
The 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 required for victory.
In Sindh province, Mr Zardari won all 65 votes. In North West Frontier Province, he got 56 out of the 65 votes. In Balochistan province he won 59 of the 65 votes.
However, he won only 22 out of 65 seats in Punjab province, the heartland of former Prime Minister Nawaz Sharif's PML-N party.
Mr Sharif took his PML-N party out of the governing coalition last week, accusing Mr Zardari of breaking key promises.
Members of Mr Zardari's Pakistan People's Party declared the result to be a "victory for democracy".
Mr Zardari, 53, is one of Pakistan's most controversial politicians. For years he has been hounded by accusations of massive corruption - although he has never been convicted. He was known as "Mr 10%" and spent years in prison while General Musharraf ruled Pakistan.
Benazir Bhutto was assassinated at an election rally in December. Her father, Zulfiqar Ali Bhutto, was hanged during the military dictatorship of President Ziaul Haq.