In the 2008 presidential election, Nasheed was elected as the candidate of the first opposition coalition defeating President Maumoon Abdul Gayoom, who had ruled the Maldives as President for 30 continuous years. Nasheed assumed office on 11 November 2008.

On 7 February 2012, Nasheed resigned as president under disputed circumstances, following weeks of protests by the opposition, which had then been joined by a majority of military and police forces. The next day Nasheed stated that he had been forced to resign "at gunpoint" by police and army officers,[4] and that the protesters had joined with "powerful networks" of Gayoom loyalists to force his resignation in a coup d'état.[5] Nasheed's successor, Mohammed Waheed Hassan, who had been a 2003 political appointee of President Maumoon Gayoom, denied these claims and stated that the transfer of power was voluntary and constitutional. The Maldives' Commission of National Inquiry reported that it had found no evidence to support Nasheed's version of events.[6]

Nasheed was held in prison for an article in the political magazine Sangu, published in 1991, alleging the government had rigged the 1989 General election. He was named an Amnesty Internationalprisoner of conscience in 1991.[13] He has stated that he was tortured while in detention, including being chained to a chair outside for 12 days and forced to eat food containing crushed glass.[14]

He was later alleged by the government, to have withheld information about a bombing plot. On 8 April 1992, he was sentenced to three years in prison on that charge.[15] He was released in June 1993, then re-arrested in 1994 and 1995. In 1996 he was sentenced to two years imprisonment for an article he had written about the 1993 and 1994 Maldivian elections, and was again designated a prisoner of conscience.[13] In all, he was arrested more than twenty times during Gayoom's rule,[14] missing the births of both of his daughters.[1] During his time in jail, he spent significant amounts of time studying, producing three books on Maldivian history.[14]

In 1999, he was elected as a Member of Parliament representing Malé. However, he was forced to leave office on a theft charge that the BBC and other international media sources described as politically motivated.[14][16][17]

In September 2003 Nasheed requested that a doctor view the body of Hassan Evan Naseem, a 19-year-old prisoner who had died in Maafushi Jail while serving a term for drug possession. The subsequent investigation revealed that Naseem had been tortured to death. This revelation, and the violent suppression of the prison riot that followed, sparked the anti-government protests of the 2003 Maldives civil unrest, leading to the first State of Emergency in Maldivian history and a "turning point" in its history.[14]

In November 2003 Nasheed left the Maldives and joined Mohamed Latheef to help establish the Maldivian Democratic Party (MDP), in self-exile, in Sri Lanka and the UK. He was recognised as a political refugee by the British government in 2004. After about 18 months, Nasheed returned to Malé on 30 April 2005.

After returning to the Maldives, he began promoting the MDP before it was officially recognised by the Government. With 2 June 2005 decision to allow political parties and official recognition of the MDP, Nasheed accelerated his support campaigns for the party. He made several trips to the Atolls and neighbouring countries on behalf of the party.

On 12 August 2005 Nasheed was arrested again when he was sitting in the center of the Republican Square, with supporters of MDP, to mark the second anniversary of the Black Friday. His arrest provoked civil unrest in Malé and some other Atolls. After his arrest, acting Government Spokesman Mohamed Hussain Shareef told reporters that Nasheed had been detained for "his own safety." However, on 22 August 2005, the state announced that Nasheed was to be charged with terrorism under the Terrorism Act.[18][19]

In the 2008 Presidential campaign, Nasheed ran for the post of President on an MDP ticket, with Mohammed Waheed Hassan from Gaumee Itthihaad as the Vice Presidential candidate; this was the first time the country had held a multiparty presidential election by popular vote. In the first round, Nasheed and Waheed placed second with 44,293 votes (24.91%), behind President Maumoon Abdul Gayoom of the governing Dhivehi Rayyithunge Party (DRP), who received 71,731 votes (40.34%).

President Nasheed's first cabinet included 14 ministers. The posts were handed to politicians from the coalition with respect to the contribution to the "Watan Edhey" Coalition. As per the coalition agreement, President Nasheed created the first ever Islamic Ministry in the Maldives, with a cabinet post representing it.

Later the remaining main party in the Coalition, Adhaalath Party (Islamic Party) cut ties with the ruling MDP,[23] citing religious matters. By the end of the first year of his presidency, President Nasheed's cabinet contained only ministers from the ruling party.

With regard to the threat posed to the very low-lying islands by changes in sea level caused by global warming, in March 2009 Nasheed pledged to set an example by making the Maldives carbon-neutral within a decade by moving to wind and solar power. He argued that the cost of the change would be no higher than what the Maldives already spends on energy.[24] As part of a wider campaign by international environmental NGO 350.org's campaign publicising the threats of climate change and its effects on the Maldives, Nasheed presided over the world’s first underwater cabinet meeting on 17 October 2009, off the island of Girifushi with the meeting participants underwater in scuba diving gear.[25][26] The following month, Nasheed founded the Climate Vulnerable Forum, an association of countries affected disproportionately by climate change.[27]

On 29 June 2010, Nasheed's 12 cabinet ministers resigned en masse, protesting the behaviour of opposition MPs who they said were “hijacking” the powers of the executive and making it impossible for the cabinet Ministers to discharge their constitutional duties and deliver the government’s election manifesto. The ministers called on the President to investigate why certain MPs were blocking the government's work, citing allegations of corruption and bribery in parliament.

On 7 July, Nasheed reappointed all twelve Ministers of the Cabinet, at a ceremony held at the President’s Office in Malé. Speaking at a press conference held shortly after presenting the Ministers with their letters of appointment, Nasheed said his government would "work towards fulfilling its pledges to the people." Nasheed noted that the government had investigated the reasons why cabinet members felt they had to resign and the police had taken appropriate action. The President reiterated that only a small number of MPs are implicated in alleged corruption, saying that "the reputation of the People’s Majlis should not be tarnished because of corruption allegations against a few parliamentarians." After the re-installation of the cabinet on 7 July, the cabinet was sent to the parliament for endorsement.

On 22 November, the parliament voted and declared that only five out of the 12 appointees would be accepted. They also called for the rejected ministers to step down immediately.[28][29] This resulted in heated arguments between ruling party MDP and opposing DRP, who holds majority seats in parliament. The parliament ruled that the rejected appointees would not be considered as ministers, and refused to allow Finance minister Ali Hashim to present the 2011 state budget for parliament approval.[30] Members of MDP responded to this by declaring that neither parliament or supreme court had rights to dismiss ministers and threatened high members of the parliament.[31]

On 10 December 2010, the Supreme Court of Maldives ruled that the ministers not endorsed by the parliament cannot remain in their posts, and requested their immediate resignation from office.[29][32] Three days later, Nasheed appointed two new ministers and acting ministers for four more offices. He also reappointed the rejected Attorney General, Dr. Sawad.[33]

Less than a year into the presidency, cabinet members representing other political parties in the coalition began to resign in protest of an alleged lack of respect for transparency and the constitution. The last major party to sever its ties to the ruling party was Adhaalath Party.[21] Another issue taken up by the opposition parties was that Nasheed's government, allowed spas and resort islands to be exempt from the laws that prohibited alcohol and pork products elsewhere in the largely Muslim nation. Protests became a frequent occurrence in the streets of the capital city of Malé after the president’s coalition slowly dissolved.[34]

An opposition alliance (Madhanee Ithihaad) was formed on December 2011, including all the parties that supported the President in his 2008 presidential race. Those parties included Gaumee Party, Jumhoory Party, and Adhaalath Party. On 23 December, the capital city saw major opposition protests against Nasheed and his government.[35] Former cabinet minister Mohamed Jameel Ahmed was repeatedly summoned to the police station in connection with the protests, at one point being detained at Dhoonidhoo, a Maldivian prison island. Chief Justice Abdulla Mohamed ordered his release, but according to the police his non-compliance with their on-going investigations[36] against him led in turn to his being arrested by members of the Maldives National Defense Force.[37]

The opposition's protest in the Republic Square lasted for 22 consecutive days. On 6 February 2012, the Maldives Police Service declined to use force to control or disperse the protests and joined the protest.[44] In the early hours of 7 February 2012, President Nasheed was seen inside the military headquarters.[45] The Maldives National Defense Force subsequently had a standoff with police who had joined the protesters, in which the MDF fired rubber bullets into the crowd. (The President's office, however, denied these reports.)[46][47]

Military forces increasingly joined the opposition, and Nasheed resigned that day.[47] His statement read: "I believe if I continue as the President of the Maldives, the people of the country would suffer more. I therefore have resigned as the President of Maldives. I wish the Maldives would have a consolidated democracy. I wish for justice to be established. My wish is for the progress and prosperity of the people. And I thank you all for your support and contributions to achieve success for the past three years." He also stated his hope that his resignation might avoid international pressure on the Maldives over the unrest.[48] Vice President Mohammed Waheed Hassan, who claims to have opposed Abdulla Mohamed's arrest, was then sworn in as the new president, and a warrant was issued for Nasheed's arrest.[49]

Nasheed later wrote that he was forced to resign "at gunpoint", and that "powerful networks" of Gayoom loyalists had manipulated events to "strangle" Maldivian democracy.[5] The coup interpretation was also backed by UK MP David Amess, Chairman of the All Party Parliamentary Group to the Maldives, but contradicted by UK Prime Minister David Cameron, who asserted that Nasheed "had resigned".[50] Nasheed's successor and opposition forces also stated that the transfer of power was voluntary.[49] A later British Commonwealth meeting concluded that it could not "determine conclusively the constitutionality of the resignation of President Nasheed", but called for an international investigation.[51] The Maldives' Commission of National Inquiry, appointed to investigate the matter, found that there was no evidence to support Nasheed's version of events. The US State Department and the Commonwealth of Nations Secretary Kamalesh Sharma welcomed the release of the report, and called on Maldivians to abide by its decision.[6] Chief of Defense Force Moosa Ali Jaleel, however, says the circumstances leading up to the resignation of former President gave rise to the fact that resignation was obtained by “illegal coercion”. “I fully believe that President [Nasheed] resigned under duress,” he said.[52] According to former military intelligence head Ahmed Nilam, "Academically speaking, the events on February 7 fulfilled all the essentials of a coup. It involved all the features of a coup that are widely accepted around the world."[52]

On 8 February, the MDP convened an emergency executive meeting and called for its members to go into streets. President Nasheed then attempted to lead the protesters to the Republic Square. Before his march reached the square, however, the Maldives Police Service dispersed the protest with batons and pepper spray. An Amnesty International spokesperson later condemned the police tactics as "brutal" and "outright human rights violations".[53]

In the weeks following Nasheed's resignation, he requested that the Commonwealth of Nations threaten the Maldives with expulsion unless new elections are held. The Commonwealth supported Nasheed's call for early elections, calling on both Nasheed and Waheed to enter talks to arrange new polls before the year's end.[51]

A documentary about Nasheed's efforts to halt climate change, The Island President, was filmed throughout 2009 and 2010. It was directed by Jon Shenk, produced by Actual Films, and features a soundtrack with songs by Radiohead. The film won the Cadillac People's Choice Documentary Award at the 2011 Toronto International Film Festival[54] and opened in New York City on 28 March 2012.[55]The New York Times describes the film as "unabashedly pro-Nasheed" and "the biggest media event Mr. Nasheed could have hoped for" to publicize his cause.[56] The film proved popular in the Maldives, with scalpers reportedly selling tickets at twice their value.[56]The Island President received generally positive reviews from U.S. critics, holding a 98% "Fresh" rating at Rotten Tomatoes[57] and a score of 72 out of 100 at Metacritic.[58]

On 1 April 2012, Nasheed stated that he was unsure of the official charges against him in the Maldives: "One time they said it was terrorism, another time they said it was acting against the constitution, another time they said it was alcohol."[1] In September, he was put on trial for abuse of power for his actions in arresting Abdulla Mohamed;[59] however, his trial was cancelled without explanation.[60] Nasheed was again arrested in October for violating a court order not to leave Malé Atoll, the atoll on which the Maldivian capital is located.[61] He was detained overnight and then released on the condition that he would answer questions about his alleged abuse of presidential powers within 25 days.[62]

Nasheed was reported to have taken refuge in the Indian High Commission office in Malé in February 2013 after a Maldivian court issued an arrest warrant against him and ordered the police to detain him.[63][64] On March 2013, he was arrested on the charges of abuse of the office[65] but was released a day later.[66] Numerous stops and starts to his trial followed.[67]

In February 2015, Nasheed was arrested again and ordered to stand on trial for his decision to arrest Abdulla Mohamed in 2012 while he was the President.[68] On 13 March 2015, Nasheed was sentenced to thirteen years in Maafushi Prison for abducting Abdulla Mohamed. He was charged under the Anti-Terrorism Act of Maldives. The three-judge bench unanimously found him guilty of ordering the arrest of Abdulla Mohamed in January 2012, when he held the office of the President. The ruling came four days after Nasheed's lawyers quit in protest against what they called was a biased trial aimed at destroying his political career. He was originally cleared of the charge but a few days later, the prosecutor general had him re-charged and arrested under tough anti-terror laws.[69][70] The court rejected an objection from Nasheed’s lawyers that two of the judges were not suitable to hear the case because they had testified against Nasheed at a police inquiry on the judge’s arrest. The court also dismissed four witnesses produced by Nasheed’s lawyers before they even testified, saying they were not strong enough witnesses. Nasheed had earlier been charged with abuse of power but prosecutors last month filed more serious charges under the country’s terrorism law. The trial was completed after 10 hearings over 23 days.[7]

Amnesty International's Asia-Pacific Director Richard Bennett said: "Amnesty International condemns the conviction of Mohamed Nasheed to 13 years in jail by judges who were state witnesses during an earlier investigation of this case. This trial has been flawed from start to finish, and the conviction is unsound."[71]

On 16 January 2016, Nasheed, following foreign pressure,[72] was granted permission to leave for the U.K. by the Maldivian Government to undergo a spinal surgery. According to a statement by the Ministry Of Foreign Affairs, Nasheed "was granted permission under the condition to serve the remainder of the sentence upon return to the Maldives after surgery".[73] While in London, Nasheed, with the support of lawyer Amal Clooney, has vocally drawn attention to the Maldives' democratic shortcomings.[72] Mr Mohamed Nasheed, who is serving 13 year jail term on terror charges, was granted 30 days leave for a back surgery, which expired on 22 January 2016. The former president requested an additional 60-day leave extension was temporarily rejected by the Maldivian authorities.[74] Nasheed contends that a state-owned company once led by Maldives President Abdulla Yameen sold nearly $300 million worth of oil to Myanmar’s military dictatorship in the early 2000s; with nearly half the money disappearing.[75]

In May 2009 Nasheed was presented with Coral Cultivation Initiative Award by Huvafen Fushi Resort and Underwater Spa, Maldives in recognition of his active participation in cultivating coral in the resort’s nursery as well as for his efforts in creating greater awareness on the impact of climate change in the Maldives.[76] One month later, the Anna Lindh Memorial Fund awarded Nasheed the 2009 Anna Lindh Award for the role he played in bringing democracy to the Maldives and in recognition of his efforts "to put people and their human rights at the heart of the debate on climate change".[77]

In September 2009 at the global premiere of the film The Age of Stupid, Nasheed was presented with a "Not Stupid" Award for his efforts to tackle climate change and for the Maldives' announcement to become the first carbon-neutral country in the world.[78] In the same month, Time magazine named Nasheed to its "Leaders & Visionaries" category within its annual list of "Heroes of the Environment".[79]

On Earth Day 2010 Nasheed was awarded the United Nations' Champions of the Earth Award. He received it at a gala event in Seoul, Republic of Korea, in conjunction with the B4E Business for the Environment Global Summit. According to a press release by the United Nations Environment Programme, the award was in recognition of Nasheed's being "an articulate voice for the vulnerable and the poor facing the challenges of global warming and also a politician who is showcasing to the rest of the world how a transition to climate neutrality can be achieved and how all nations, no matter how big or how small, can contribute".[80] That year, he was also named by Foreign Policy magazine in its list of top global thinkers.[81]

On 28 June 2012, Nasheed received the James Lawson Award from the International Center on Nonviolent Conflict at Tufts University in Massachusetts, US. The award was given to "recognize his leadership in opposing the long dictatorial regime that lasted before his election and to recognize his opposition to the armed coup earlier this year which forced him from power, and his renewed nonviolent action on behalf of restoring genuine democracy in his country".[84]