A court in Pakistan on Thursday granted several days of protection from arrest to former Prime Minister Nawaz Sharif in graft cases, clearing the way for him to return home from self-imposed exile in London, where he went in 2019 for medical treatment.

The decision by the Islamabad High Court is a major boost for Sharif and his party and comes two days before he is to return to Pakistan ahead of parliamentary elections in January as the country faces deepening political and economic turmoil.

Sharif has been a fugitive from justice since failing to appear before a Pakistan court in 2019. He traveled from London to Saudi Arabia last week and is to return home on a special plane from Dubai on Saturday, according to his Pakistan Muslim League party.

ARRESTS MADE IN CONNECTION TO MOSQUE ATTACK TARGETING ANTI-INDIA MILITANT IN PAKISTAN

Sharif stepped down as prime minister in 2017 after being convicted of corruption. Two years later, facing further graft charges, he complained of chest pains and was granted permission by his successor, Imran Khan, to travel to London for medical treatment following a court order.

Sharif prolonged his stay in London, saying his doctors were not allowing him to travel.

In 2020, an anti-graft court in Islamabad issued a warrant for his arrest after he failed to return home. The same court on Thursday suspended the arrest warrant for him until Oct. 24.

Nawa Sharif

Former Pakistani Prime Minister Nawaz Sharif leaves a court in Lahore, Pakistan, on Oct. 8, 2018.   (AP Photo/K.M. Chaudary, File)

Also on Thursday, the Islamabad High Court granted Sharif bail until Oct. 24, giving him protection from arrest until then, according to his legal team.

Sharif's party hailed the court's decision. His special plane is to land at Islamabad's airport on Saturday, and he will travel to Lahore the same day to address a rally to be held at a public park under tight security.

Sharif, who served as prime minister three times, was convicted in 2018 and sentenced to 10 years in prison by the anti-graft tribunal in a corruption case involving purchases of luxury apartments in London.

PAKISTAN CLAIMS 2 CIVILIANS SHOT DEAD BY TALIBAN AT AFGHAN BORDER

Khan, Sharif’s successor and main political rival, is also imprisoned in a corruption case and is serving a three-year sentence. Khan was ousted in a no-confidence vote in April 2022 and was replaced by Sharif’s younger brother, Shehbaz Sharif, who served as prime minister until August, when he stepped down to allow an interim government to run daily affairs and organize the elections.

Khan, who was convicted of corruption under Shehbaz Sharif’s government, is still Pakistan's leading opposition figure and enjoys a large following, along with his Pakistan Tehreek-e-Insaf party.

Pakistan has been in deep political turmoil since Khan’s ouster last year.

CLICK HERE FOR MORE TRUE CRIME FROM FOX NEWS

Shehbaz Sharif hailed the granting of bail to his brother by the Islamabad High Court.

"The elected prime minister, Nawaz Sharif, was disqualified based on a fictitious and fabricated story. He was implicated in absurd cases and subjected to mistreatment. Any fair hearing would have established his innocence," he wrote on X, formerly known as Twitter.

The Pakistan Muslim League is currently widely unpopular because Shehbaz Sharif’s government failed to contain inflation, though he says he managed to save the country from default. The party wants Nawaz Sharif to head its election campaign, although he is expected to appear before multiple courts in Islamabad starting Oct. 24 to face his remaining legal cases.