On July 26, the Maldives celebrated its independence day with the traditional hoisting of the national flag, parades, ceremonies and an address by President Mohamed Nasheed.
But there is a greater significance to the festivities of recent times. It is only the third year when freedom from colonial rule for this collection of 1,192 islands in the Indian Ocean has been accompanied by another kind of liberty - democracy.
On October 28, 2008, Maumoon Abdul Gayoom, Asia's longest-serving head of state, conceded his 30-year rule of the Maldives had come to an end.
He lost its first ever democratic elections, vanquished by a former journalist who had been arrested, jailed and tortured for his opposition to Gayoom's regime.
But the transition was marked by conciliatory gestures on both sides. Gayoom expressed his "full support" for his successor, while leading members of Nasheed's Maldivian Democratic Party stressed they were "not interested in revenge".
The world applauded - congratulations were swiftly sent by India, the US and the Commonwealth - just as it has applauded Nasheed's subsequent environmental initiatives.
These include declaring that the Maldives would be the first country to go carbon neutral within a decade, and holding a cabinet meeting underwater to highlight the dangers of climate change to low-lying island nations. Nasheed has most recently been appointed to serve as one of the judges for this year's Zayed Future Energy Prize.
But back home, the euphoria of three years ago has long since dissipated. In May, demonstrations on the streets of the capital, Malé, were broken up by police with tear gas and batons.
Food prices have risen by as much as 30 per cent, hitting many hard in a country where about 40 per cent of the population still earns less than $2 a day.
After failing to win a majority in the 2009 legislative elections, Nasheed's MDP administration has been constantly frustrated by the opposition-controlled parliament. His entire cabinet resigned last July in protest at the "scorched-earth tactics" of Gayoom's old party, the Dhivehi Rayyithunge Party (DRP), which then refused to endorse seven of the 12 ministers when the president reappointed them.
The US think tank Freedom House classifies the Maldives as still only "partly free" and noted in its last report that "corruption, religious restrictions and abysmal prison conditions remain serious problems", although no one has yet been convicted of the torture and abuse that took place under the previous regime.
Most remarkably of all, Gayoom has ended his retirement from politics and appears to be preparing the ground for a comeback.
"If we were to come to power, things will change for the better," he said in June, hinting strongly that he intended to stand in the next presidential election, in 2013.
That the former dictator can now cast himself as the candidate of reform only three years after his 30-year autocracy ended - and not be laughed off the platform - suggests the transition to democracy is in trouble, if it has not stalled completely.
In 2009, President Nasheed could proudly boast: "We have a blueprint here in the Maldives. You don't need to bomb a Muslim country for regime change."
Is it now, however, quite a different example? Of how such a transition can be derailed when a country with no experience of liberal democracy suddenly finds that it has become one?
If outsiders find it surprising that such troubles should afflict this atoll nirvana, that is because the Maldives of the tourist brochures is totally different to the real one.
A suite complete with your own pool and beach cabana at the Waldorf Astoria resort on the northern island of Manafaru, for instance, costs just shy of $1,200 per night, yet the average Maldivian earns only about $4,000 in a year.
But the exclusive hotels with their dreamy vistas of turquoise seas are on the "uninhabited" islands.
On the 200 "inhabited" isles, the local population of just under 400,000 live in a conservative, Sunni society, where "a non-Muslim may not become a citizen", according to the constitution. Poverty and drug abuse are rife, the capital is the most densely populated city in the world - about one third of all Maldivians are crammed into its two square kilometres - and in prisons the treatment of inmates was described until recently as "medieval" by Ahmed Naseem, the current foreign minister.
If these facts are little known, it is because the Maldives barely attracted the attention of any, save the most intrepid traveller, for centuries.
The Arab explorer Ibn Battuta visited in the 14th century and described the islands as "one of the wonders of the world".
Two centuries later, the Portuguese tried to establish a garrison but were driven out after 15 years.
In the mid-17th century the Dutchgovernor of Ceylon claimed overlordship of the islands but maintained no actual presence there. The vague notion of "protection" by a colonial power was finally formalised by the British in 1887, although domestic affairs remained in the hands of the sultans, who continued to reign until a republic was declared in 1968, three years after independence.
•••
Only when tourism began to take off in the 1970s did the Maldives begin to acquire its reputation as one of the most luxurious destinations on the planet.
Although it may appear to have been an obvious choice for a country with such an abundance of reefs and unspoilt beaches, in the previous decade a UN development programme report had advised against it - the Maldives, it concluded, lacked the necessary infrastructure.
True, there was no telecommunications system until Cable and Wireless arrived to install one in 1977; neither was there an international airport until 1981.
But soon after the first organised tourist trip in 1972, resorts began to be built. By 1984, more than 100,000 visitors a year were flying into the country - double that by 1991. Today, the numbers are closer to 600,000 and tourism has become the Maldives' biggest industry, making up about 30 per cent of the economy and 90 per cent of government revenue.
It has also led the country to become the richest, in terms of GDP per head, in South Asia.
Nearly all of this phenomenal growth occurred on Gayoom's watch. Perhaps it would be this for which he would have been remembered had he stood down in 2003 after 25 years in power.
Instead, he sought another five-year term in office. That September, a teenager called Evan Naseem was beaten to death while jailed, while other prisoners were shot in an ensuing riot.
When the news reached Malé, it provided the tipping point for anger at Gayoom's repressive rule to spill out onto the streets. The "mayhem" was "unprecedented", reported the BBC at the time.
Further light was shed on that period in May, when photographs of prisoners tortured in custody were leaked by the presidential commission, established two years ago to investigate allegations against the previous regime. The pictures showed men held in cages, chained to coconut palms and lying on blood-soaked mattresses.
"This commission has received information that some inmates who were tortured ended up dead," said Ameen Faisal, the national security adviser.
Ahmed Naseem, the foreign minister, claimed the prison officers' barbarism was "limited only by their imagination".
None of this is news to President Nasheed, who, during his own period of imprisonment, was forced to eat ground glass and left for days in the sun, trapped in a tiny metal box.
"No one has to convince me about human-rights abuses and corruption," he told me when I interviewed him at the opening of the Hilton Iru Fushi Resort on Noonu Atoll, 170km north of Malé, in 2009. "I know it is true."
But from the start, Nasheed was careful to pursue a path of reconciliation. "In the past, whenever there has been regime change, the ruler was either mobbed or sent out from the country," he said. "We want to break that circle and see if we can find amicable solutions."
This has required extraordinary restraint, not least on his part when it came to the security services. "I've never removed my own jailers, only the chief of police. The rest of the top brass are my own interrogators."
How, I asked him, could he deal with that? "It's not to do with me, it's not personal," he said. "They respect me because I never actually confessed, even when I was dealing with a, let's say, more robust policeman."
During our conversation, Nasheed talked a lot of the need to be "careful", "tactful" and "delicate".
"There are a number of challenges. The constitution is very new [it came into effect only shortly before the presidential elections in 2008]. We're moving from feudalism to pluralism and, more importantly, we haven't had the rule of law and therefore do not have many qualified judges." The judiciary, he said, was "very hollow".
But even then he seemed to be aware of the dangers of such a non-confrontational approach.
"I'm trying not to prosecute the previous regime," he said. "But it's becoming very difficult for me to sell it to the grassroots. For instance, here on this atoll, we command a very comfortable majority - two of the three parliamentary seats. But a number of the people have been brutalised - there are a lot I know, even on this island, who wake in the night screaming. They want to see justice done."
All along, Nasheed has faced a major obstacle on the gentle, healing path he prefers - the continued presence of former president Gayoom, not only in the Maldives but also in politics.
He looked pained when the subject of his predecessor came up. "It's difficult while Gayoom remains and keeps on challenging," he said. "He's unrelenting. But, you know, nothing has been easy. We will not give up."
•••
Perhaps part of the problem has been that, as Dr Gareth Price, senior research fellow at the London foreign-policy think tank Chatham House, puts it, "Gayoom was far from the top of the list when it comes to human-rights abuses."
Price is no apologist for the former president. In fact, as a South Asia specialist he was asked to help advise Gayoom's opponents when they were in exile in England.
"All the opposition lived in Salisbury," he recalled. "We wrote something together documenting their experiences in case it all went wrong when they returned."
But ultimately it did not all go wrong when Nasheed returned in 2005, a year after President Gayoom had announced the beginning of his reform agenda, which was to involve a newly independent judiciary, allow the formation of political parties, set up a human-rights commission, limit presidential terms and guarantee freedoms.
The dictatorship did not dismantle itself overnight - only two months after the reforms were announced, in August 2004, demonstrations were put down violently in Malé, with one activist sentenced to 10 years in jail for "abetting terrorism".
In late 2006, the novelist Hari Kunzru visited and found Nasheed "sunk in gloom".
"I worry we might have lost the only possibility for change," the then opposition leader told him.
There is a debate about Gayoom's motives for initiating democratic elections. Some argue his hand was forced by opposition at home and the international reaction to Evan Naseem's death.
Others, such as Ahmed Shaheed, who served as foreign minister under both Gayoom and Nasheed, claim the entire reform programme was dreamed up by the British PR firm, Hill & Knowlton, hired to put a gloss on his regime's image.
But he did allow the process to go ahead and Gayoom topped the poll in the first round of the 2008 presidential election. As he did not win 50 per cent of the vote, he and Nasheed, the runner-up, went to a second round, in which the latter emerged victorious with a lead of eight-and-a-half per cent.
Gayoom's strong showing - he won 40 per cent in the first round - made him, he said, the Maldives' "most popular public figure".
It is clear he has retained a considerable following. But there are many reasons why Maldivians have not rejected their autocratic past with the enthusiasm the outside world might expect. The feudalism to which Nasheed referred is still far from dispelled.
"There's a very strong culture of patronage, even if it's not publicly acknowledged," said JJ Robinson, editor of the country's online newspaper, Minivan News.
"To a great extent the katheebs, or island chiefs, are now the MPs."
Just as before, individuals seeking help with medical care, funding for education or overseas visits go to their chiefs. The legal system cannot be relied on to pursue pre-2008 wrongdoing when, as Mr Robinson puts it, "the judiciary was a part of the former ministry of justice".
If the culture of democracy is still far from embedded in the Maldives, hopes for its successful practice were dealt a catastrophic blow by the global financial crisis.
Tourism was hit badly and the steep drop in visitor numbers, along with a huge increase in expenditure by Gayoom towards the end of his last term, took the economy "to the brink of crisis", according to the Asian Development Bank.
The World Bank declared the Maldives to be in the worst economic situation of any country undergoing a democratic transition since the 1950s.
President Nasheed has managed to reduce the deficit from 31 per cent to 16 per cent and can now boast of a four per cent growth forecast for this year.
But some of the measures he has taken, such as introducing taxes on goods, services and business - income tax is to follow - were bound to be unpopular with those having to pay up for the first time.
The president admitted in our interview that a shortage of money in the government coffers was having a negative effect on the population's view of their new political system. "We need help," he told me. "We need budget support. If I can't throw them some goodies, what's so good about democracy? To sell democracy you have to be able to market it."
Meanwhile, Gayoom is not only painting himself as the architect of reform in the Maldives but is also accusing Nasheed and the MDP of serving only their own interests. "Nowadays MDP members and supporters benefit from everything. They can spend the government's money in any way they want," he said on June 9, the seventh anniversary of the announcement of his Reform Agenda.
"A system under which a country's citizens live in fear of political persecution is not a democratic system at all."
His party, the DRP, is currently divided into two factions, one supporting him, the other his former deputy Thasmeen Ali.
But Gayoom made clear his interest in running in the next presidential election when he declared that the party's candidate had to be elected via a primary - a contest he expects to win.
Truth and reconciliation are generally considered the most reliable guides in any transition from dictatorship to democracy, but the first is elusive in the Maldives while the second can hardly be said to be sufficiently present in a society still so divided.
"Establishing real democracy here will be the greatest justice of all," President Nasheed told Time magazine a few months after taking office.
Taking a less conciliatory line would have been difficult. "Nasheed would have had to assume dictatorial powers to get Gayoom," said one close associate.
Some wonder, though, if Nasheed's magnanimity has been excessive and that he should have made a clearer, more openly judgemental break with the past.
"That will be the big question when the transition comes to be looked at a few years down the line," according to the associate.
The prospect of the former dictator using democratic means to attempt a comeback is an irony that will not be lost on those who suffered under his regime. If Gayoom should regain the presidency - and while it is not the most likely outcome, it cannot be ruled out - then it will not just be the judiciary, but the notion of justice itself, that will seem hollow.
Sholto Byrnes is a contributing editor of the New Statesman.