The Madhya Pradesh High Court on Thursday ordered immediate release of religious leader Computer Baba, arrested earlier this month after his "illegal" ashram in Indore district was demolished.
Subsequently, he was released from a prison in Indore in the evening.
A division bench of Justices SC Sharma and Shailendra Shukla directed that Namdeo Das Tyagi (54), popularly known as Computer Baba, should be released forthwith if he was not wanted in any other case.
The court was hearing a habeas corpus petition, his lawyer said.
Habeas corpus petition is generally filed when a person is missing or has been illegally detained.
The order should be immediately forwarded to the jail authorities, and Additional Advocate General Pushyamitra Bhargava "shall also undertake to communicate the order...to the Superintendent of Central Jail, today itself," the HC said.
Mr Bhargava told the court that Baba was arrested under relevant section of the Code of Criminal Procedure, and an order for his release has already been issued.
Baba was arrested on November 8 by way of preventive action after the illegal construction he had made on two acres of government land on the city's outskirts was demolished.
Three cases were registered against him at two police stations in Indore after the arrest.
His lawyer Vibhor Khandelwal said the lower courts had granted his client bailing all three cases.
Computer Baba was appointed chairman of a river conservation trust by the previous Kamal Nath-led Congress government and enjoyed the status of Minister of State. Before that, the BJP government too had given him MoS rank.
He later fell out with the BJP. In the run-up to November 3 by-elections to 28 Assembly seats in the state, he had dubbed 22 rebel Congress MLAs who joined the BJP as "traitors".
Watch: Computer Baba Joins Rahul Gandhi's Bharat Jodo Yatra Computer Baba Hurt In Accident In Madhya Pradesh, Calls It "Conspiracy" Encroachments By Computer Baba's Aide Demolished In Madhya Pradesh: Official Wary Of NASA Satellites, How Farmers Time Crop-Burning, Scientist Explains New Zealand MP Leads Traditional Dance, Rips Up Copy Of Bill In Parliament This Trump Pick Might Spell Trouble For Indian Techies, H-1B Visa Seekers Key Government Agency To Probe Ola Electric Over Product Issues Hate Speech Watchdog To Quit Elon Musk's X Over Updated Terms Of Service European Watchdog Partially Approves New Alzheimer's Drug Track Latest News Live on NDTV.com and get news updates from India and around the world.