A court in Karachi on Thursday ordered Pakistan's government to lift a travel ban on former military ruler Pervez Musharraf in 15 days' time, his lawyer said, possibly drawing a line under a raft of legal troubles.
Musharraf has been battling several court cases since he returned to Pakistan last year to fight elections, including treason charges for imposing emergency rule in 2007, stoking tensions between civilian authorities and the powerful military.
His exit from Pakistan could help ease those tensions at a time when the country is fighting a resurgent Taliban following a brazen attack on Karachi's airport this week.
"The court has allowed our appeal and ordered to strike down Musharraf's name from the Exit Control List. The order will be executed after 15 days," lawyer Farogh Naseem told AFP.
The delayed execution of the order "will give time to the government to appeal in a superior court if they so desire", he added.
Musharraf, 70, flew to Karachi in April to undergo medical tests.
He has said he wants the travel ban lifted so he can visit his sick mother in Dubai, but many in Pakistan see it as a ruse to flee the country and avoid the litany of criminal cases against him dating back to his 1999-2008 rule.
He also faces several murder cases.
The former commando has been staying with his daughter in Karachi where he travelled for the tests at a navy-run hospital.
He has been having medical treatment since January, when he was rushed to hospital after suffering heart problems on his way to court for a hearing.
After his indictment for treason in March, Musharraf asked to be allowed to visit his mother, who is in her 90s, but was denied permission.
The ex-general, who seized power in 1999 and resigned in 2008, has pleaded not guilty to the treason charges.
Musharraf is also on bail in three other major cases linked to his time in power including the 2007 assassination of opposition leader Benazir Bhutto in a gun and suicide attack, and the murder of Baluch nationalist leader Nawab Akbar Bugti in 2006.
The hearing comes as pressure mounts on Pakistan to strike the Taliban's headquarters in the North Waziristan tribal district following the all-night siege of Karachi airport on Monday that left 37 dead including 10 attackers.
The assault was followed on Wednesday by the first two US drone strikes on Pakistan soil this year that killed at least 16 militants, raising suspicions of coordination between the two countries after the programme was reportedly suspended to give Islamabad space to pursue a peace process.