Former Pakistani prime minister Nawaz Sharif was released from prison late Wednesday to be met by jubilant supporters after a court suspended his prison sentence for corruption pending an appeal hearing.
Sharif -- who was ousted from office last year by the Supreme Court for alleged corruption -- was freed along with his daughter.
Sharif and Maryam Nawaz were arrested on their return in July from London to campaign in elections.
Hundreds of his supporters had gathered outside Adiala prison in the garrison city of Rawalpindi to await their release.
An AFP reporter at the scene said Sharif, Maryam and his son-in-law Captain Safdar were driven away in an SUV as it was pelted with rose petals in celebration.
Images showed Nawaz's younger brother Shahbaz Sharif waving at supporters from the front seat of the vehicle.
Dozens of jubilant supporters chanted "Prime Minister Nawaz Sharif!" outside the Islamabad High Court after the decision was announced.
The court has not yet released a detailed judgement explaining the decision.
It was not clear when Sharif's appeal will be heard. The anti-graft watchdog has the right to go to the Supreme Court to contest Wednesday's bail ruling.
An anti-corruption court in July sentenced Sharif in absentia to 10 years and his daughter to seven years over properties they allegedly owned in Britain, following revelations in the Panama Papers.
Sharif claims he is being targeted by the country's powerful security establishment. His Pakistan Muslim League-Nawaz (PML-N) party lost the election on July 25 to the rival Pakistan Tehreek-e-Insaf led by former cricket hero Imran Khan.
"Today the court has suspended the decision that was based on revenge," former minister Ahsan Iqbal told reporters.
"This trial is important because even a blind person in Pakistan will see that there was neither law nor constitution in the decision and it was just pre-poll rigging to pave the way for Imran Khan to win elections," he said.
- 'Political victory' -
Shahbaz Sharif, who headed the PML-N after his brother's imprisonment, tweeted a verse from the Koran in Arabic that said: "Truth has come and falsehood has departed."
Nawaz Sharif's wife died in a London hospital earlier this month and he along with his daughter and son-in-law were granted parole to attend her funeral.
"The verdict is a political victory for Nawaz Sharif and he will use it to further assert his narrative that his imprisonment was a political move," political analyst Hassan Askari told AFP.
"The release of Nawaz means he will further mobilise his party and other opposition parties against the government," Askari added.
Sharif, now 68, has been prime minister three times but power has been a rough ride.
He was expelled from office in 1993 on suspicion of corruption. He won an election in 1997, only to be ousted and exiled after a military coup in 1999.
Nawaz returned to Pakistan in 2007 and took power once more in 2013, only to be ousted by the Supreme Court in July last year.