Shah Mehmood Qureshi was freed from Adiala jail on Tuesday after the Lahore Court (LHC) Rawalpindi court ruled that the arrest of the PTI deputy chairman was unlawful.
He promised to see the PTI head after being released from prison, offer his political wisdom, and ask for advice.
The LHC Rawalpindi bench had earlier ordered the immediate release of Mr. Qureshi, who had been detained for allegedly taking part in the violent protests on May 9.
Since his initial detention, Qureshi, a former foreign minister, has been detained several times.
The bench ruled that Qureshi should no longer be detained in accordance with the Maintenance of Public Order Ordinance (MPO) after hearing a petition challenging his detention.