The Islamabad High Court suspended the 10-year sentence for Sharif and the seven-year term handed down to his daughter, Maryam, over corrupt practices linked to his family's ownership of upscale London flats.
A Pakistani court on Wednesday ordered the release of former Prime Minister Nawaz Sharif and his daughter, suspending their prison sentences for corruption pending an appeal hearing, his lawyer said.
"Today, the Islamabad High Court has suspended the verdict against Nawaz Sharif, his daughter Maryam Nawaz and his son-in-law Captain Safdar and ordered to release them on bail until a final decision," Khawaja Haris, Sharif's lawyer, told AFP.
They will be released after the payment of sureties of Rs500,000, he said.
It was not clear when the appeal will be heard. The anti-graft watchdog has the right to appeal to the Supreme Court against Wednesday's ruling.
Dozens of jubilant supporters chanted "Prime Minister Nawaz Sharif!" outside the court after the decision was announced.
Sharif was ousted from office last year by the Supreme Court for alleged corruption.
An anti-corruption court in July sentenced them in absentia to 10 and seven years respectively over properties they allegedly owned in Britain, following revelations in the Panama Papers.
Sharif and his daughter were arrested on their return to the country in July to campaign in elections later that month.
"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.
Shahbaz Sharif, Nawaz's younger brother who headed the Pakistan Muslim League Nawaz (PML-N) after his sibling's imprisonment, tweeted a verse from the Koran in Arabic that said: "Truth has come and falsehood has departed."
Sharif claims he is being targeted by the country's powerful security establishment. His PML-N party lost the election on July 25 to the rival Pakistan Tehreek-e-Insaf led by former cricket hero Imran Khan.
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.