Mr Nasheed was elected on a wave of optimism in 2008, in the islands’ first multi-party election.
Mr Nasheed, a former human rights campaigner, beat long-time ruler Mr Gayoom, who had been in power for 30 years and was widely seen as autocratic.
Since then, correspondents say, the country has been gripped by constitutional gridlock – parties opposed to the president have dominated parliament since general elections the following year.
A one-time political prisoner, Mr Nasheed became a vocal figure in office on issues relating to the environment and climate change.
But he has faced constant opposition – from those loyal to former President Gayoom and from religious conservatives who accuse him of being anti-Islamic, says the BBC’s South Asia analyst Jill McGivering.
That pressure has intensified with the prospect of fresh presidential elections, scheduled for next year. Opposition parties are jockeying for power as they try to extend their influence.
The wider question is how this crisis will affect the forthcoming elections – and what it says about the transition in the Maldives to mature democracy, our correspondent says.