Pakistan's military president, Pervez Musharraf, is expected to win re-election in a vote on Saturday by the two houses of parliament and four provincial assemblies.
In all, five candidates are taking part in the presidential election, but two are simply alternate runners in case a last-minute hitch stops either Musharraf or the main opposition party contender, Makhdoom Amin Faheem, from contesting.
The following are profiles of the three main candidates.
Eight years after seizing control in a coup, General Musharraf, 64, appears set to win five more years in power. If he wins and completes his new tenure, Musharraf will be the longest-serving Pakistani ruler.
He has promised to quit as army chief after his election, and will be the first military ruler to do so while staying in power. Generals have ruled Pakistan more than half the 60 years since the country was founded, following independence from British colonial rule and the partition of India.
Treated as a pariah after his coup, Musharraf became a vital ally of the West after the September 11, 2001, attacks by Al- Qaeda on the United States.
He is credited with bringing Pakistan back from the brink of bankruptcy, opening peace talks with India and promoting a freer press. Critics say he consolidated power by marginalizing popular leaders and creating a vacuum filled by Islamists.
A former army commando who has survived many crises, including at least two al Qaeda-inspired assassination attempts, Musharraf saw his popularity plummet after he tried to fire the chief justice in March
Born in Delhi in 1943, Musharraf migrated to Pakistan with his family when British-ruled India was divided in 1947.
His main political base is the Pakistan Muslim League, cobbled together from the rump of the party of former prime minister Nawaz Sharif, who was ousted and sent into exile by Musharraf.
Liberal economic policies have won Musharraf the support of many in the business community.
Makhdoom Amin Faheem
Faheem is the de facto head of the Pakistan People's Party in the absence of his self-exiled leader, former prime minister Benazir Bhutto.
Faheem first served as minister in the government of Benazir's father, Zulfikar Ali Bhutto, Pakistan's first popularly elected prime minister, who was toppled and hanged by the military in late 1970s. He also served in Benazir Bhutto's two government's in the late 1980s and 1990s.
A large landowner in his native Sindh province, the soft-spoken Faheem has remained loyal to the Bhutto family throughout his political career. He was offered the post of prime minister by Musharraf after the 2002 general election, but he refused.
Born in 1938 in New Delhi, Ahmed is nominated in the presidential poll by lawyers' bodies opposed to military rule. Ahmed was one of the judges who resigned in 2000 after refusing to swear allegiance to Musharraf. He has said he is sure he cannot win the election but wants to challenge Musharraf's "unconstitutional rule".
He is supported by an opposition alliance led by Sharif, but many of their lawmakers have resigned from parliament to protest against Musharraf's re-election while still army chief.