Few heads of state have been demonised the way the outgoing president of Pakistan, Asif Ali Zardari, has
How will history judge Zardari's years in office?
After five years as president of Pakistan, Asif Ali Zardari is all but at the end of his tenure. Few heads of state have been demonised the way he has since assuming political leadership of the country, after the December 2007 assassination of his wife Benazir Bhutto.
The vast majority of Pakistanis will be happy to see him leave the largely powerless ceremonial presidency in September after the election of Mamnoon Hussain in July. With it, one of the bitterest chapters in the country's political history would draw to a close - or so Mr Zardari's many detractors would like to think.
Pakistan's switch of attention towards the newly anointed administration of Prime Minister Nawaz Sharif, winner of the May 11 general election, has resulted in the cessation of the vitriol against Mr Zardari. By polling day, most Pakistanis had tired of the incessant abuse of the president and, while still inclined to view him with suspicion, had even learnt to grudgingly respect Mr Zardari's ability to survive.
While they hate to admit it, not even his detractors expect him to be prosecuted for the many acts of corruption and other evils he is alleged to have perpetrated when Bhutto was prime minister in the 1990s. Quite simply, he has been acquitted of all charges or is no longer liable to respond to them.
Hindsight being rarely less than clear sighted, it is worth re-examining Mr Zardari's acts as president to ascertain whether or not he will be dumped into the dustbin of political obscurity.
His rise to the office in September 2008 was the direct consequence of his wife's murder and the departure of military dictator Gen Pervez Musharraf. Cynically, those who were glad to see the back of her were the first to accuse Mr Zardari of the deed, and later were the ones who blamed his government for delaying the trial. Their implication was that Mr Zardari had collaborated with Mr Musharraf to stage a bloody coup within his own household, to accrue power.
But he didn't. Instead, he piloted the process of constitutional reforms, enacted unanimously by parliament in 2009, that deprived the president of the powers to dismiss the government, moved all executive decisions to the office of prime minister and parliament, and saw the devolution of powers hogged by the federal government to its four provincial counterparts.
No Pakistani politician had ever been so giving. He did so because he understood that his best chance of survival was to engineer the constitutional defences of Pakistan's fragile democracy against the ever-present threat of a military coup - there have been four in the country's 66-year history.
So he fought foul with fouler still, appointing as key cabinet ministers politicians who were unpopular even within his Pakistan People's Party, as counter-detractors, to keep enemies of the Bhutto dynasty distracted. Meanwhile, the three children of the Bhutto-Zardari union have had time and space to grow into young, educated adults ready to begin their political careers. In time, one will emerge as the successor of their grandfather, Zulfiqar Ali Bhutto, prime minister in the 1970s until his overthrow and execution in 1979 by the junta led by Gen Zia ul Haq.
Mr Zardari has summed up that strategy with the words "democracy is the best revenge", a phrase that infuriated his detractors until it took on new meaning in April this year when Mr Musharraf returned to Pakistan to contest the elections, only to be disqualified, and subsequently arrested and detained on four capital-punishment-bearing charges, including abetment of Bhutto's murder.
The public image of Mr Zardari as a Mr Hyde tends to overlook the achievements of Dr Jekyll, perhaps because he knew it wasn't worth the effort to try to take credit.
Within months of his becoming president, Tehrik-i-Taliban Pakistan (TTP) militants invaded the northern Khyber-Pakhtunkhwa province and by 2009 posed a serious threat to Islamabad and to the very survival of the country as a cohesive nation state.
On his watch, the government staged a counteroffensive that, following major gains this year, looks set to end the TTP's reign as a state within the state of Pakistan, just in time for the withdrawal of US-led international combat forces from Afghanistan next year. Of course, the whole show was run by the military, but Mr Zardari's role as the face of the parallel diplomatic effort, amid hugely strained ties with the US and India, was important nonetheless.
His best work has been in developing economic and trade ties with China, Pakistan's top strategic ally. By making dozens of trips to Beijing and the various economic hubs in China, he has overseen the transformation of a partnership viewed internationally with suspicion because it was based on transfers of military technology.
The nurturing of a relationship based on trade and investment in infrastructure development has played well into the overall strategic vision of Pakistan's military. Under Mr Zardari, the military has come to accept that the development of bilateral relationships need not be hostage to political differences.
Mr Zardari's detractors would do well to note that he is a political animal comfortable with adversity. The last five years have had little effect on him personally in comparison to the 11 years he had earlier spent in prison on charges that he has since outlived.
He recently said that, once freed from the restrictions of being president, he would be free to make disclosures that would put his detractors in their proper place.
There is every reason to take that seriously.
Tom Hussain is an Islamabad-based freelance journalist