When Asif Ali Zardari became president in September 2008, few believed he would complete his five-year mandate. As he prepares to stand down in September, he has demonstrated his ability to survive the office's many challenges, but Pakistanis are divided over his legacy.
One of his most widely recognised achievements was amending the constitution in 2010, making him the first ruler to willingly hand over several powers to the prime minister, and to the four provinces.
His Pakistan People's Party (PPP) "amended the constitution to strengthen democracy and the federation," political analyst Hasan Askari Rizvi said, attributing Zardari's success to the coalition he created between his minority government and traditional rivals.
"He delivered on the political front as he kept the government together by managing a diverse group of coalition partners."
The landmark 18th amendment changed nearly 100 articles of the constitution, devolved 18 ministries to the provinces and gave the prime minister the power to appoint the army chief.
Zardari's full term saw him lead the country through its first transition from one civilian government to the next, in May's general elections.
But his tenure was marred by deteriorating security in the face of the Taliban insurgency, a dwindling economy and the worst electricity cuts in the country's history.
Zardari has also been accused of tolerating corruption for the sake of political stability.
Lawyer and political commentator Babar Sattar said Zardari's overall legacy is negative, despite the positive reforms.
"He survived through the distribution of patronage to his followers and destroyed the national economy," Sattar said.
"He failed to address the issue of militancy and today he is under threat and we all are more despondent than ever before."
Zardari was also dogged by the judiciary over alleged corruption in the 1990s, when he held various cabinet positions under his wife Benazir Bhutto, who was prime minister in 1988-90 and 1993-96. She also headed the PPP until she was assassinated in December 2007.
As Zardari prepares to step down, that skeleton may re-emerge from the cupboard as the new government of Prime Minister Nawaz Sharif has already written to Swiss authorities to re-open the graft cases.
But Sattar cited Swiss authorities as saying the cases' time limit has expired, and said Zardari's real problems lie elsewhere.
"Security threat is the real issue," Sattar said, explaining that personal security concerns could prevent him from addressing the public or holding rallies, "which is key to revive political prospects."
Zardari has received threats from militants and his security chief was killed on July 10 in Karachi. He left the country for Dubai and then London shortly afterwards, officially to visit his children, but many saw the trip as a reaction to the breach of security.
Observers have speculated that he may emigrate once he loses the protection of high office, which would hurt the party image and expose him to ridicule.
Rizvi predicted Zardari would shuttle between Pakistan and the United Arab Emirates, and try to shift responsibilities for running the party at home to other senior party leaders for a while.
"I think he is a survivor and will stage a comeback," Rizvi said.
Sattar questioned the likelihood of such a comeback succeeding.
When he took over from Musharraf in 2008, Zardari was swept to power by the popularity of his assassinated wife, Sattar said, and kept it by "offering a share in the pie" wherever needed.
"We will wait and see how he can remain relevant when there is no pie to offer."