Prime Minister Abdullah Ahmad Badawi defended the judiciary after an attack by jailed deputy prime minister Anwar Ibrahim, who accused three appeal court judges of being "under the thumb of the executive".

"The judiciary is independent. I have given the assurance to the judiciary and when I met them (recently), I said I will respect their independence and I recognise their decisions because they are an independent body," Abdullah said.

Anwar was denied bail on Wednesday and stood up in his appeal court hearing to hurl abuse at the judges, accusing them of being "spineless" and partial.

The outburst forced the judges to leave the courtroom.

The former deputy prime minister has served four years in jail on corruption charges and was seeking bail while awaiting the outcome of an appeal against his conviction for sodomy, for which he was sentenced to nine years in prison.

After the judges walked out, Anwar, once heir apparent, told the courtroom audience, including US, British and Canadian diplomats that Abdullah's pledges to combat corruption and foster transparency in Malaysia were "hypocrisy".

"Abdullah should stop this charade. Abdullah should ensure there is a separation of powers. Abdullah should free himself from Mahathir's grip," he said.

Independent role

Abdullah, who replaced former premier Dr Mahathir Mohamad in November, said he does not question the judiciary on any matters that have been brought to court.

"Our democratic system is based on the independent role of the judiciary. We have the legislature and the executive and the three functions are working well in Malaysia," he told reporters.

"On the whole, I believe the majority of the people accept and believe that there is independence in the judiciary," he added.

A Malaysian rights group on Thursday criticised the decision to deny bail to Anwar, saying ordinary people were aghast with disbelief over the ruling.

"The Anwar Ibrahim case has been a protracted one marked by undue delays and dishonourable tactics that have ravaged justice," P Ramakrishnan, president of Aliran, said in a statement.

The United States also condemned Wednesday's decision, and said Anwar's treatment exposed deep flaws in Malaysia's judicial process. Both the United States and Amnesty International regard him as a political prisoner.

Mahathir sacked the charismatic and popular Anwar in 1998 and he was later sentenced to a total of 15 years in prison on charges Anwar says were trumped up to prevent him from making a challenge for the premiership.

If granted bail, Anwar wants to travel abroad for treatment for a slipped disc in his back, which he says happened in a police assault when he was first arrested. - AFP