On Monday, a Pakistani court annulled the death sentence handed to former military ruler Pervez Musharraf, ruling that the special court which had found him guilty of treason last year was unconstitutional, a government prosecutor said.
The original ruling had marked the first time a former leader of the armed forces had faced such a sentence for treason in Pakistan, where the military maintains a strong influence and senior officers are often considered immune from prosecution.
It caused a wave of controversy, with Musharraf – exiled in Dubai – slamming it as a "vendetta" and the military expressing disappointment.
A High Court in the eastern city of Lahore ruled the sentence "illegal" on Monday.
"The filing of the complaint, the constitution of the court, the selection of the prosecution team are illegal, declared to be illegal... And at the end of the day the full judgment has been set aside," the prosecutor representing the government, Ishtiaq A. Khan, told French Press Agency (AFP).
"Yes, he is a free man. Right now there is no judgment against him any longer," Khan added.
Musharraf's lawyer, Azhar Siddique, also told media outside the court in Lahore that it has "nullified everything."
The prosecution now has the option to file a new case against Musharraf with the approval of the federal Cabinet.
The treason trial – which began in 2013 and is just one of several involving Musharraf – centered on his decision to suspend the constitution and impose emergency rule in 2007.
Musharraf first took power after ousting prime minister Nawaz Sharif in a bloodless coup in 1999. The general is largely held as a cigar-smoking, whiskey-drinking moderate and became a key U.S. ally in the "war on terror" after the Sept. 11 attacks, escaping at least three al-Qaida assassination attempts during his nine years in office.
His rule faced no serious challenges until he tried to sack the Supreme Court chief justice in March 2007, sparking nationwide protests and months of turmoil that led to the imposition of emergency rule.
After the December 2007 assassination of former Prime Minister Benazir Bhutto, the national mood plunged further and Musharraf was left increasingly isolated by the crushing losses suffered by his allies in February 2008 elections.
He finally resigned in August 2008 in the face of impeachment proceedings by the new governing coalition and went into exile.
Musharraf returned to Pakistan in 2013 in an attempt to contest elections, but was barred from taking part in the polls and from leaving the country as a barrage of legal cases mounted.
The travel ban against him was finally lifted in 2016 when he traveled to Dubai for medical treatment. He has resided there ever since.
The treason case against him was first launched by his old foe Sharif in 2013. It went on for years with repeated delays until last year's surprise announcement.