The Islamabad High Court on Tuesday suspended the prison sentence that had been handed to former Pakistani Prime Minister Imran Khan for a corruption conviction.
Khan had been sentenced to three years in prison after he was found guilty of concealing gifts he had received while in office.
The 70-year-old was ousted in a no-confidence vote in April 2022.
A lawyer on Khan's legal team, Babar Awan, said that the court ordered Khan be released on bail. He told reporters that Khan was "again entitled to lead his Pakistan Tehreek-e-Insaf party."
The former prime minister still faces dozens of other criminal proceedings. His lawyers filed a separate petition in the high court, requesting judges order authorities not to arrest him on other charges.
Will Imran Khan be allowed to run for office?
It was not immediately clear whether the high court's order would enable Khan to run in general elections, which are due in early 2024.
Lawyer Ihsan Ahmed was cited by the German Press Agency (DPA) as saying that the suspension of the graft sentence does not immediately qualify Khan to run for office,
Pakistani law bars those with criminal convictions from running in elections or leading political parties.
Pakistan's general election was delayed from late 2023 as the Election Commission of Pakistan requires several months to redraw constituency maps based on census results. Under normal circumstances, elections must be held within 90 days after parliament is dissolved.
Imran Khan and supporters of his Pakistan Tehreek-e-Insaf (PTI) party argue that the charges against the former leader are politicized and designed to prevent him from posing a challenge to the governing coalition in upcoming elections.
Last week, PTI's vice-chair was arrested after he gave a press conference in which he criticized the decision to delay the general election.
In May, thousands of PTI supporters took to the streets after Khan was jailed. Military installations were ransacked during the demonstrations.