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," lawyer Khawaja Haris told AFP. They will be released after the payment of sureties of 500,000 rupees ($4,024), he said.

It was not clear when the appeal will be heard. The anti-graft watchdog has the right to go to the Supreme Court to contest Wednesday's bail ruling. Dozens of jubilant supporters chanted "Prime Minister Nawaz Sharif!" outside the court after the decision was announced.

The Supreme Court ousted Sharif from office last year for alleged corruption. An anti-corruption court in July this year 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 that month to campaign in elections. 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.

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.

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.