Bersih chairperson Maria Chin Abdullah has been freed from detention under the Security Offences (Special Measures) Act 2012 (Sosma), a day before her habeas corpus hearing.

She was released at the Bukit Aman police headquarters this afternoon, according to her lawyer Ambiga Sreenevasan.

"Initially, they said they will record her statement. So I went inside to accompany her as they took her statement.

"At the end of it, they got an order to release her. We were really stunned and both of us broke down," Ambiga told Malaysiakini.

Maria was driven to her home in Petaling Jaya immediately after she was freed and were greeted by her three sons.

According to Bernama, Kuala Lumpur police CID chief Rusdi Mohd Isa said Maria was released at 4.30pm but declined to elaborate.

Maria to appear at Dataran

Meanwhile, Bersih officials said that the candlelight vigil at Dataran Merdeka for Maria's release would proceed as scheduled at 8pm.

Maria is expected to make an appearance.

Maria was arrested on Nov 18, one day before the Bersih 5 rally.

She was investigated under Section 124C of the Penal Code for engaging in activities detrimental to parliamentary democracy and held under Sosma.

Maria's lawyers said the attorney-general's chambers did not file an affidavit in reply to the habeas corpus application.

Human Rights Commission (Suhakam) said she was kept in solitary confinement in a small windowless room which only had a wooden bed, with no mattress.

Police chief Khalid Abu Bakar had promised that Maria's well-being was being looked after and that she was provided a mattress and copy of the Quran.