At the Kuala Lumpur High Court, Mr Anwar pleaded not guilty to four counts of corruption, the first of 10 charges, all relating to allegations that he committed homosexual acts while he was Mr Mahathir's finance minister and deputy.
The judge refused a defence request to grant special observer status to representatives of international organisations including the United Nations, the Malaysian Bar Council and Amnesty International.
Judge Augustine Paul said that "the presence of these people here would interfere with the exercise of [judicial] powers."
He added: "This is a big insult to the court. It gives the impression that the court may not be dispensing justice."
Monitors from Amnesty and the American group, Human Rights Watch, managed to get some of the 50 seats available to the general public.
Large numbers of riot police, some armed with automatic weapons, patrolled the court building close to Kuala Lumpur's Freedom Square in the city centre. Several hundred supporters of Mr Anwar gathered and shouted occasional slogans, but there was no repeat of the large demonstrations which have taken place in Kuala Lumpur on most weekends in the last two months.
Mr Anwar says the charges are an attempt by Mr Mahathir to discredit the man who was regarded for years as his natural successor. Mr Anwar was sacked two months ago after he and the Prime Minister disagreed on measures to deal with the Asian economic crisis.
If convicted, he could face up to 20 years in jail.Reuse content