Freed politician Anwar Ibrahim said on Tuesday Muslims attacking United States policies must also have the courage to stand up to their own governments' oppression.

In a speech on the second day of a five-day visit to Indonesia, the former deputy prime minister urged Islamic nations to balance with introspection their heavy criticism of incidents like the US military abuse of prisoners in Iraq.

"We attacked the US invasion of Iraq, its defense of Israel's Zionist regime occupying Palestine because these actions are against moral imperatives and justice," Anwar said.

"We reject the US political hegemony, we reject their terrorism and oppression but we have to ask a question: are there not Abu Ghraibs in Islamic countries?" he said, referring to an Iraqi jail where US troops allegedly tortured inmates.

"We revolt because Iraq is under US occupation but we tolerated Saddam Hussein's oppression in Iraq and keep silent about cruelty in hundreds of prisons in the Islamic world," Anwar said.

Anwar, who was once Malaysia's deputy prime minister under Dr Mahathir Mohamad, was jailed in 1998 for allegedly sodomising his official driver, then abusing his power to cover up the act.

Trumped up charges

He and human rights groups maintained the charges were trumped up to prevent him from challenging Mahathir, whose 22-year reign as Malaysian leader ended when he retired in October last year.

Malaysia's Federal Court overturned Anwar's sodomy conviction in September, saying the charges could not be proved beyond reasonable doubt and criticising the police and prosecution for their handling of the case.

Anwar has called on the Malaysian government to charge or release all detainees held under its tough Internal Security Act, which allows detention without trial.

The detainees include more than 80 alleged Islamic militants suspected of involvement in terror groups, many said to be members of the Al-Qaeda-linked Jemaah Islamiah group responsible for bombings in Indonesia, including the Bali attacks in 2002.

Anwar also said thousands of foreign workers have been jailed and whipped in Malaysia for staying illegally.

"When I was in the government several years ago, I did not jail anyone," he said.

Anwar is in Indonesia to meet senior Indonesian figures, including former leaders. Organisers of the trip are seeking a meeting between Anwar and President Bambang Yudhoyono on Friday.