A Pakistani appeals court on Tuesday suspended the corruption conviction and three-year prison term of Imran Khan in a legal victory for the hugely popular embattled former prime minister, his lawyers and court officials said.

Although he will face a retrial in due course, the ruling will enable Khan, 70, to contest the upcoming parliamentary elections. Khan has denied the charges, insisting he did not violate any rules.

The Islamabad High Court also granted bail for Khan, but it was not immediately clear if he will be released as he faces a multitude of other charges brought since his ouster through a no-confidence vote in the parliament in April 2022.

IMPRISONED FORMER PAKISTANI PM IMRAN KHAN PLANS TO CHALLENGE GRAFT CASE

Khan lawyer Shoaib Shaheen said the Islamabad High Court issued a brief verbal order and a written ruling will be issued later. Khan was convicted and sentenced earlier this month by a court that found him guilty of concealing assets after selling state gifts he received while in office.

"Imran Khan is again entitled to lead his Pakistan Tehreek-e-Insaf party after today's court order," Babar Awan, another senior attorney for Khan, told reporters after the announcement of the decision.

Earlier this month, Pakistan’s Election Commission had disqualified Khan from running for office for five years. Under Pakistan’s laws, no convicted person is eligible to lead a party, run in elections, or hold public office.

man holds victory sign in front of photographer

A supporter of Pakistani imprisoned former Prime Minister Imran Khan flashes a victory sign after a court decision in Islamabad, Pakistan, on Aug. 29, 2023.  (AP Photo/Anjum Naveed)

Khan's spokesman, Zulfiqar Bukhari, in a statement welcomed the court order, hoping the former premier would be freed from the Attock prison in the eastern Punjab province where he has been held since his arrest earlier this month.

He said the legal battle for Khan's acquittal would continue. Bukhari said he is praying that now "no misadventure happens now and Imran Khan is not rearrested" as he leaves prison or on the way to his home in the eastern city of Lahore, the capital of Punjab.

EX-PAKISTAN PM IMRAN KHAN BLAMES FORMER MILITARY CHIEF AFTER FIRST SUGGESTING US HASTENED HIS DOWNFALL

Since his ouster, Khan has said that his removal was a conspiracy by the United States, his successor Shehbaz Sharif, and the Pakistani military — accusations that they all deny. Sharif stepped down this month after the parliament’s term ended.

Sharif took to X, the platform formerly known as Twitter, to criticize the court ruling, saying everyone was expecting it. He said if "thieves and state terrorists are facilitated, then from where (will) the common man get justice in the country?"

Meanwhile, Pakistan is facing deepening economic and political turmoil.

CLICK HERE TO GET THE FOX NEWS APP

Inflation was 13.4% when Sharif came to power in April 2022, but the country recorded a record monthly inflation rate of 37% in April 2023, indicating Sharif had failed to revive the economy. Currently, many Pakistanis are facing price hikes. They also received high energy bills this month, sending a wave of anger among people who say the bills have eaten up their entire salaries.

The upcoming vote has been complicated by an announcement by the election oversight body that elections must be delayed for at least three to four months because it needs more time to redraw constituencies to reflect the recently held census.

Under the constitution, a vote is to be held in October or November. Until then, caretaker Prime Minister Anwaar-ul-Haq Kakar is running the day-to-day affairs. Kakar has said that he will ensure the vote is held in a free, fair and transparent manner.