"It's a historic ruling and definitely a wonderful step in terms of civil liberties in Malaysia," the lawyer said.

Malaysia's state-run Bernama news agency said Raja Petra, 58, was due in court later on Friday and will be formally released after a court accepted his lawyer's plea that his arrest was illegal.

Raja Petra, who runs the popular Malaysia Today website, has increasingly infuriated authorities by publishing numerous claims about alleged wrongdoing by public officials, claims the government has denounced as lies.


Malaysian deputy PM Najib Abdul Razak has been a frequent target of Raja Petra [EPA]
This is not the first time that a court has ordered the release of ISA detainees, and the ruling also does not prevent the government from re-arresting him under the ISA.

The government can also appeal the ruling.

The ISA, a colonial-era law first used against communist insurgents, allows the government to detain anyone for an initial two-year period without charges, and to extend their detention indefinitely.

Raja Petra's arrest came amid growing opposition to the Malaysian government which has seen its five-decade hold on power increasingly under threat.

His detention in September triggered widespread protests by civil rights groups, lawyers and other online commentators.

One particular target of Raja Petra's blog has been Najib Abdul Razak, the deputy prime minister who is widely expected to take power after a leadership transition in March next year.

Sedition charge

Raja Petra is currently also facing sedition charges in a separate court for linking Najib to the gruesome murder of a Mongolian woman - allegations Najib has denied as "total lies".

Altantuya Shaariibuu, an interpreter and a model, was shot in the head twice and her body blown up with explosives in a jungle outside the Malaysian capital in October 2006.

Some of Malaysia's most popular blogs offer stinging anti-government commentaries and present themselves as a substitute for mainstream media, which are controlled by political parties or closely linked to them.

According to government estimates, there are more than 700 Malaysians who blog on social and political issues.