But President Jammeh surprised everybody in February 2011 by calling on him to resign as the Arab Spring began to hot up. Losing Gaddafi's money punched a big hole in The Gambia's budget. The president also broke off relations with Taiwan, in 2013, after it refused to provide more money to bail him out. He had probably hoped China would reward him for rupturing relations with Taipei, but this has not happened. The Gambia also ended relations with Iran, in 2010, resulting in the cancellation of trade and aid projects such as the $2bn (£1.2bn) agreement to supply The Gambia with heavy and commercial vehicles.
This has left The Gambia needing new allies. Turkey is one of the few that remains loyal, and President Jammeh went to Ankara on a state visit in 2014. The Turkish Armed Forces have trained the Gambian gendarmerie force since 1991, and Gambian soldiers train in Turkey to this day. Wooing the Gulf States and improving relations with Saudi Arabia seems to be part of President Jammeh's search for new friends.
The Gambia announced in December it would accept Rohingya refugees from South East Asia as part of its "sacred duty", hoping this and becoming an "Islamic republic" opens cheque books and replaces past allies such as Libya, Iran and Taiwan.
In December 2016, President Jammeh faces presidential elections. Playing up his Islamic credentials helps internationally but will also have a resonance domestically as 90% of Gambians are Muslim.
What are the practical implications for individuals and society in the country?
Given that President Jammeh's announcement appears to have been made on a whim, there is a lot of uncertainty on what type of "Islamic republic" The Gambia will become.
President Yahya Jammeh:
- born in May 1965
- seized power in a coup in 1994
- vowed to stay in power for "a billion years", if God wills
- claimed in 2007 he could cure Aids and infertility with herbal concoctions
- warned in 2008 that gay people would be beheaded
- declared The Gambia an Islamic republic in 2015
The country still has a secular constitution and a legal system based on English common law.
Some aspects of traditional law and Sharia also apply, but Sharia does not apply to non-Muslims without consent.
A 4 January 2016 executive directive that all female government staffers must cover their hair during office hours was quickly rescinded after its sparked anger among opposition leaders, activists and pro-democracy groups. The state broadcaster now regularly describes The Gambia as an "Islamic republic", and the country's Supreme Islamic Council has welcomed the change of status. It is not clear if the introduction of fully fledged Sharia is planned (non-Muslims were reassured in December) and whether there will be a referendum to amend the secular constitution. But the national flag will certainly be changed to reflect the country's new status.
It is unlikely to have any impact immediately, as tourism is a prime source of revenue and President Jammeh runs the country with an iron fist.
It is more likely frustrated young Gambians will over time become even more vulnerable to being radicalised because this "Islamic republic" will offer little new and growing inequality, poverty and the lack of jobs will remain pervasive.
What impact will it have on the region?
Relations with neighbouring Senegal are poor, and The Gambia is isolated within the regional bloc, the Economic Community of West African States (Ecowas).
An attempt by Ecowas, in 2015, to introduce term limits on presidents from the region was blocked by President Jammeh and his Togo counterpart, but highlighted their isolation. President Jammeh has ruled the country since seizing power through a coup in 1994 and seems to have no ambition to retire from being The Gambia's leader.
Longer-term, the biggest single threat to The Gambia is climate change as Banjul risks becoming Atlantis because of rising sea-levels. Already, prime beaches are being visibly degraded, and this is impacting tourism.
What does it mean for the West?
Relations with the West are already poor because of concerns about human rights abuses:
- The Gambia has pulled out of the Commonwealth because of pressure over its rights record
- The US has suspended The Gambia's participation in the African Growth and Opportunity Act (AGOA) over rights issues
- In December 2015, the EU halted some $16m (£11m) in development assistance because of human rights
The Gambia had already expelled the EU charge d'affairs, in June.
The Gambia was never really strategic to the West, which is mostly indifferent to what happens there.