The high court in Islamabad has bailed former Pakistani Prime Minister Imran Khan for two weeks after the Supreme Court freed him from custody the previous day.
Khan attended the high court on Friday for a hearing on his petition challenging corruption charges against him.
Khan was arrested in a land fraud case on Tuesday, sparking massive protests across the country.
The apex court ruled on Thursday his detention was illegal and ordered his release.
Khan's political party called for a rally near the court, but police imposed an emergency order banning gatherings.
They held dozens of his supporters who showed up.
Khan has been at odds with current Prime Minister Shehbaz Sharif, leading to protests demanding the early dissolution of parliament and a general election.
The Sharif administration called the court decision to release Khan unacceptable. Senior government officials say he should be taken into custody again.