Sharif was ousted and disqualified from holding office by the Supreme Court in July 2017 and jailed earlier this year in absentia
Pakistani authorities released former prime minister Nawaz Sharif and his daughter from jail on Wednesday after a court suspended prison sentences they got in July over the purchase of upscale apartments in London.
Supporters showered Sharif's car with rose petals after he was freed from the jail in the garrison city of Rawalpindi, television footage showed. "The prisoners have been set free," Ishaq Cheema, an official at Adyala jail, told Reuters.
Earlier in the day Islamabad High Court suspended the 10-year jail term of the three-time premier, who was once the favourite of Pakistan's powerful generals but has since fallen out and clashed with the military.
The ruling comes almost two months after Sharif's party lost a general election to the party of new Prime Minister Imran Khan. Sharif's party and others allege the July 25 polls were rigged to favour Khan, who is seen to be close to the army.
The court also freed Sharif's daughter and political heir Maryam, who was jailed for seven years on corruption charges relating to the family's acquisition of the London flats.
"The prosecution has failed to show the properties belong to Nawaz Sharif," Justice Athar Minallah told the court.
The convictions are still under appeal with the same court, but the judge said they should be freed immediately while the case continues.
"Justice has been served, and I congratulate Nawaz Sharif's supporters," former Foreign Minister Khawaja Asif, a staunch Sharif ally, said outside the courtroom, where supporters chanted pro-Sharif slogans.
Sharif was ousted and disqualified from holding office by the Supreme Court in July 2017 and jailed earlier this year in absentia. He was arrested on July 13 upon returning from London.
The case against Sharif stemmed from 2016 Panama Papers revelations that showed his family owned the London apartments through offshore companies. Maryam was convicted for concealing ownership of the properties. They both deny wrongdoing.
Sharif's release comes a week after the death aged 68 of Kulsoom, his wife of 47 years, who had been battling cancer in a London hospital. The former First Lady's funeral in Pakistan, for which the family were briefly paroled, gripped the nation.
Sharif has repeatedly called the cases against him politically motivated, suggesting collusion between the military and courts to destabilise his Pakistan Muslim League-Nawaz (PML-N) party and throw him out of power.
Pakistan Tehreek-i-Insaf (PTI), the ruling party led by former cricketer Khan, said the judiciary was independent and the cases would continue.
"The Sharif family still has not proven where the billions of rupees came from for their property," said Fawad Chaudhry, the government's information minister, according to PTI's official Twitter account.
In opposition, Khan was a vocal supporter of the legal cases that removed Sharif from office.
Sharif, a political survivor, was previously jailed after the 1999 coup by military ruler Pervez Musharraf. Sharif later went into exile after striking a deal with the military and returned in 2007 to contest an election after Musharraf stepped down in the face of mass protests.
Khan is making his first official overseas trip to Saudi Arabia, the country that gave Sharif shelter after the 1999 coup, where he is reportedly seeking financial help to stave off the likelihood of another IMF bailout.