Anwar Ibrahim, 62 to go on second sodomy trial on Monday.

BANGKOK: During more than three decades in politics, Anwar Ibrahim has spent a good share of his time behind bars — from his detention during his days as a rabble-rousing student leader in the 1970s to his imprisonment a decade ago on charges of abuse of power and sodomy.

On Tuesday, a new trial begins for Mr. Anwar, 62, the charismatic but polarizing politician who leads the country’s resurgent opposition.

The accuser is new, but the charge is again sodomy. A conviction this time could end the career of Mr. Anwar and reshape Malaysian politics.

For Malaysia’s 26 million people, the trial is the latest chapter in the bitter struggle for power between the governing coalition, which has ruled since independence from Britain more than five decades ago, and the diverse but ascendant opposition parties.

“This is as much a court case as it is a battle for public opinion,” said Ibrahim Suffian, the director of the Merdeka Center, an independent polling agency in Malaysia.

The accuser, Saiful Bukhari Azlan, is in his early 20s and was a former campaign worker for Mr. Anwar.

The trial is being greeted with wariness by many of those who remember the first one, a decade ago, when a stained mattress was introduced as evidence and newspapers were filled with debates and testimony about the exact details of the sexual relationship. The largest newspapers and television stations are controlled by the governing coalition and were cheerleaders for a guilty verdict.

This time, the trial is likely to divert attention from the country’s communal tensions and economic weakness. Churches and mosques have been attacked in recent weeks over the issue of whether non-Muslims should be allowed to use the word “Allah” for God.

Malaysia’s capital, Kuala Lumpur, is modern, and the country’s globe-trotting elite is cosmopolitan, but the question of whether the ban on sodomy should be repealed has never gained traction beyond a small circle of activists. In India, which shares many laws from its British colonial heritage, a similar ban was overturned last year by a court on the grounds that it was discriminatory.

In Malaysia, sodomy, or “carnal intercourse against the order of nature” as described by the penal code, is illegal for both heterosexual and homosexual couples and is punishable by 20 years in prison.

Even a relatively short prison term could sideline Mr. Anwar, the head of the People’s Justice Party, from politics for a long time. Any sentence over one year would automatically impose a ban on holding political office for five years from the date of release.

“The people are aware that we are not going to get a fair trial,” Mr. Anwar said in a telephone interview Friday. “The party is prepared,” he said with typically combative vigor.

Mr. Anwar did not elaborate on preparations by the opposition beyond saying that contingency plan was in place to name a successor in case he was found guilty.

During his last imprisonment, his wife, Azizah Ismail, ran for his seat and won. Some supporters now look to their daughter, Nurul Izzah, who was elected to Parliament two years ago, for leadership.

Mr. Anwar has played a key role in holding together an improbably diverse opposition alliance composed of his own multiethnic party, a conservative Islamic party, Pas, and the left-leaning Democratic Action Party, made up mainly of ethnic Chinese.

His absence would pose a major challenge to the opposition in its quest for power. But Mr. Ibrahim and other analysts also believe it could also strengthen their popularity, especially if Mr. Anwar is perceived by the public as a victim of a government smear campaign and a kangaroo court.

Sympathy could win Mr. Anwar crucial votes among his own ethnic group, the Malays, and cement the allegiance of the Chinese and Indian minorities. Mr. Anwar has toured the country in recent weeks, speaking to large crowds and lashing out of the government.

“We are going on the offensive,” he said in the telephone interview. “We are dealing with a very oppressive regime.”

Throughout his career, Mr. Anwar has perhaps been most comfortable as the underdog.

Mr. Anwar spent nearly two years detained without trial during the 1970s, when he led a conservative Islamic student movement against the government, and he served six years for sodomy and abuse of power in allegedly trying to cover up the allegations. The sodomy conviction was overturned in 2004, but appeals over abuse of power were ultimately rejected.

Unlike those previous legal battles, he has the advantage this time of being able to make his case on the Internet, which remains relatively free in Malaysia and features many blogs and news sites free from government censorship.

And until now, Mr. Anwar appears to have had a receptive audience: only 11 percent of Malaysians surveyed in a poll conducted soon after the sodomy charge was announced two years ago believed it. That may change once the trial begins Tuesday.

On Friday, Mr. Anwar was dealt a pretrial setback when the country’s highest court denied him access to evidence gathered by the prosecution that his lawyers had argued were important to his defense.

“The appellant is not entitled to know by which way the prosecution intends to present the facts,” Abdull Hamid Embong, a judge in the Federal Court, said in denying access to the evidence. “This remains the prerogative of the prosecution.”

Sankara Nair, one of Mr. Anwar’s lawyers, said in an interview Saturday that Mr. Anwar would demand that the trial be postponed Tuesday because a preliminary application to have the case thrown out had not been resolved. — NYT