Article published on the 2008-08-07 Latest update 2008-08-07 08:54 TU
"This is slander, it is a malicious allegation and I am not guilty," Anwar said from the dock, after being accused of consensual sex with 23-year-old aide Mohamad Saiful Bukhari Azlan.
Since his release he has been active in politics but, until recently, not able to officially run in elections. He says the new accusations are a government plot to stop him from toppling the government.
They come ahead of a by-election, due on 26 August, in which he is tipped to return to parliament.
Sodomy is illegal in predominantly Muslim Malaysia, even between consenting adults. Anwar could face up to 20 years in prison if found guilty.
The oppositon leader welcomed the judge's decision to release him on bail until a new hearing on 10 September, allowing him to campaign for the by-election, and said the prosecution had been ill-prepared.
"You can see how haphazard this has been. I am pleased with the decision and will continue my campaign," he said.
Security was tight outside the packed courtroom, guarded by some 200 mainly riot police. Hundreds of supporters massed outside to greet Anwar, some shouting "reformasi" (reform), the slogan of the movement he founded.
Prime Minister Abdullah Ahmad Badawi on Wednesday denied accusations that the government has engineered the allegations.
"There's no conspiracy," he said, according to the New Straits Times newspaper. "How could I insist that he be charged? The police are not so stupid to simply charge if there is no evidence."