The leader of the main opposition party in the Maldives has attended a hearing on terrorism and sedition charges.
Nasheed was arrested last August
Mohamed Nasheed, who heads of the Maldivian Democratic Party, was arrested in August last year during a pro-democracy rally in the capital.
Mr Nasheed has long been a vocal critic of President Maumoon Abdul Gayoom, who has held power for more than 25 years.
Police cordoned off the area around the court, as protesters rallied to demand the president's resignation.
Mr Nasheed's supporters say this is a politically motivated trial.
He had attended a rally marking the mass arrest of reformists in 2004. It led to clashes with police, and initially the government said Mr Nasheed had been detained for his own safety.
Now he is facing life in prison on sedition charges.
Police in full riot gear quelled the demonstrators outside the court, reports the BBC's Dumeetha Luthra at the scene.
At one point they suddenly turned on one of the BBC's team members.
Without provocation they squirted pepper spray into his face, and threatened him with violence and prison.
Two other journalists were detained; they were released at the end of the hearing.
The MDP has called for President Gayoom to step down and call multi-party elections.
The longest-serving leader in Asia, he has led the country since 1978.
The government says it is introducing a reform programme and multi-party elections will be held in 2008.