ON MONDAY a struggle over human rights and democracy will come to a head in an important Muslim country. The site is not Egypt or Turkey but Malaysia, a country of 28 million that, as it has prospered economically, has grown an opposition movement that is pressing an authoritarian regime to share power. The opposition’s leader is Anwar Ibrahim, whose multiethnic alliance shocked the ruling party in several state elections in 2008 and who has a chance to oust Prime Minister Najib Razak in national elections expected in the next few months, if the vote is free and fair.

All that explains why on Monday Mr. Anwar will find himself not on the campaign trail but in a courtroom, where he is likely to be given a lengthy prison sentence. The charge is homosexual sodomy, which Malaysia shamefully still treats as a crime.

Mr. Anwar, who is 64 and married with children, denies the charge; he claims, plausibly, to have been framed by the government. His 26-year-old accuser met with Mr. Najib two days before the alleged sexual encounter took place. The case was brought shortly after the opposition’s 2008 victories and is coming to a conclusion just as new elections approach.

Mr. Anwar has been persecuted before. After a falling out with a previous prime minister, he was charged with sodomy in 1998 and spent six years in prison before being exonerated. Since then he has become one of the best-known advocates for liberal democracy in the Muslim world. The coalition he has fashioned of secular, Muslim and ethnic Chinese groups could make Malaysia the second majority-Muslim country in Asia, after Indonesia, to become a working democracy.

Mr. Anwar is not perfect: Lashing out at Mr. Najib after his arrest, he employed ugly anti-Israel rhetoric, for which he later apologized. He nevertheless deserves support from the United States and other nations seeking to broaden human rights in the Muslim world.

So far, the Obama administration’s stance has been weak. The State Department says that it has “closely followed the prosecution” and raised the case “regularly in Kuala Lumpur and in Washington.” But there has been little overt pressure; when President Obama met with Mr. Najib in November, he said nothing publicly about human rights or democracy. Instead he heaped praise on the prime minister for “the extraordinary cooperation that we’ve received on a whole range of issues.”

In fact Malaysia has been a modest help on terrorism cases, and it forms part of the administration’s strategy for bolstering its position in Asia. That, however, is not a rationale to step aside as Mr. Anwar, and the country’s hopes for democracy, are crushed. The State Department has said that the Anwar case is “a test of Malaysia’s commitment to democracy and the rule of law.” If the verdict fails that test, there should be consequences for Mr. Najib’s relations with Washington.