A Pakistan high court on Thursday barred authorities from arresting the country's former three-time prime minister.
Nawaz Sharif on Wednesday sought protection from arrest from a court in Islamabad before his planned return to the country, according to his lawyer.
Amjad Pervez said that Mr Sharif was granted protective bail, which orders authorities not to arrest him until he personally appears before the court on October 24.
A court in Islamabad briefly heard Mr Sharif’s plea for bail and adjourned the hearing until Thursday, Mr Pervez said.
Had he failed to win protection from arrest from the Islamabad High Court, Mr Sharif would have been detained upon his return. But having been granted bail, he will address a rally in the eastern city of Lahore before appearing before the court in Islamabad to surrender.
In 2017, the supreme court disqualified Mr Sharif from holding political office for a decade because of his involvement in a corruption case.
He is currently a fugitive from justice, having failed to appear before a court in 2019.
He has been wanted by the Pakistani authorities since 2020.
Two years later, facing further corruption charges, he complained of chest pains and was granted permission by his successor, Imran Khan, to travel to London for medical treatment. Once in London in 2019, Mr Sharif prolonged his stay, saying his doctors were not allowing him to travel.
He has since lived in voluntary exile in London until this month and is expected to return home on Saturday.
The four apartments he owns on Dunraven Street in London face Park Lane, the second most expensive road on London’s Monopoly board.
Mr Sharif's Pakistan Muslim League party says tens of thousands of people will greet him when he arrives at an airport in Lahore.
Mr Khan, Mr Sharif's successor and main political rival, is also imprisoned in a corruption case and is serving a three-year sentence.
He was ousted in a vote of no confidence in April 2022 and was replaced by Mr Sharif’s younger brother, Shehbaz Sharif, who served as a prime minister until August, when he stepped down to allow an interim government to run the country's daily affairs and organise the elections.
The parliamentary elections are expected in the last week of January.