Image copyright Reuters Image caption Nawaz Sharif was jailed alongside his daughter in July

Pakistan's former Prime Minister Nawaz Sharif has been released from prison, two months after he began a 10-year jail sentence for corruption.

The release came hours after a court suspended the sentences of Sharif and his daughter Maryam, who were jailed shortly before July's general election.

Sharif's Pakistan Muslim League-Nawaz (PML-N) lost to Imran Khan's Pakistan Tehreek-i-Insaf (PTI) later that month.

The decision came during the Sharifs' appeal. They have denied wrongdoing.

The car carrying Sharif, his daughter and son-in-law Safdar Awan was showered with rose petals by supporters as their convoy left Adiala jail.

The three then flew to Lahore, where they were met by more jubilant supporters.

Their release comes just a week after Sharif's wife, Kulsoom Nawaz, died from cancer in London.

They were briefly allowed out of prison in Rawalpindi to attend her funeral in Lahore before being imprisoned again.

What was the case about?

Sharif was sentenced in July after being found guilty of corrupt practices related to the ownership of four luxury properties in central London linked to his family.

He says the charges are politically motivated. The three-time prime minister was ousted from power a year earlier by Pakistan's Supreme Court, after his children were linked to offshore companies in the Panama Papers leaks of 2015.

His daughter, Maryam Nawaz Sharif, received seven years for abetting a crime and one year for not co-operating - sentences which were due to run concurrently - while son-in-law Safdar Awan was given a one-year sentence for not co-operating.

The convictions also barred them from seeking public office for up to 10 years after release.

What changed on Wednesday?

All three had the jail sentences imposed by the lower court on 6 July suspended by Islamabad's high court, as part of an appeals hearing.

"The prosecution has failed to show the properties belong to Nawaz Sharif. It also failed to prove how was Maryam Nawaz sentenced under the same charge sheet which convicted Nawaz Sharif," Justice Athar Minallah told the court.

Their convictions remain under appeal within the top court, but a date for a hearing has yet to be fixed.

The anti-graft body that launched the case, the National Accountability Bureau, can still appeal to the Supreme Court against the latest ruling.

The trio were released on bail of $4,000 (£3,000) each on Wednesday evening.

What now for Sharif?

By M Ilyas Khan, BBC News, Islamabad

The suspension of Nawaz Sharif's conviction is likely to boost the morale of his followers. But with elections over and a new government in place, there is no likelihood of Sharif's PML-N party gaining any political advantage in the short run.

The ruling may however entail a legal advantage to the Sharif family. His trial was seen by many as an unfair one, and the conviction was widely seen as based on assumptions rather than solid evidence.

This is seen as the reason why his sentence has been suspended, and is likely to determine the final outcome of his appeal.

Many say Sharif's conviction in July came under pressure from the ruling establishment which wanted to deprive him of a possible fourth term in power. With the elections over and a new government in place, they say, the courts are under no such pressure any more.

But others feel that as a free man, Nawaz Sharif could still cause discomfort in the system, having emerged as a powerful voice against the political role of Pakistan's military.

What has the reaction been?

The case against Nawaz Sharif has divided opinion in Pakistan.

Supporters of Sharif cheered outside the court when it gave its order to release him, while Maryam Aurangzeb, who served as deputy minister of information under Sharif, was filmed wiping her eyes.

The leader of Sharif's PML-N party said the ruling was "a victory for justice", according to Pakistan's Express Tribune.

But a senator from Prime Minister Khan's PTI party, Faisal Javad, told a local TV channel: "It is only a suspension. But they are guilty all the same. Their destination remains Adiala Jail."

Sharif had been serving as prime minister for a record third time when he stepped down last year.

He also held the office from November 1990 to July 1993 and from February 1997 until he was toppled in a bloodless coup in October 1999.