WARRI, Nigeria — To paraphrase the 18th century sage Samuel Johnson, Islamism is the last refuge of a scoundrel. One might cite any number of examples, but none is quite so striking as the latest ploy by Gambian President Yahya Jammeh, who has declared his hitherto secular country an “Islamic Republic.”

After decades as a weirdly mystical president—and a blood-curdling homophobe who threatened last fall to slit the throats of gays—Jammeh made his big announcement on Dec. 12, and life in The Gambia (also called, simply, Gambia) has gotten uglier ever since.

The 1996 constitution of this little country of fewer than 2 million people, with its capital on the sea and most of its land sandwiched inside Senegal, would remain unchanged. And Jammeh declared that this “Islamic state” would be a tolerant one.

In a widely televised broadcast, Jammeh said there would be no restrictions on dress and that Christians and followers of other faiths, who make up around 10 percent of the population, “would be given their due respect.”

But that didn’t last long.

In January, an executive order, leaked to pro-opposition newspapers, said that an “executive directive has been issued that all female staff within the government ministries, departments and agencies are no longer allowed to expose their hair during official working hours.”

“Female staff are urged to use head tie and neatly wrap their hair,” it added, without giving reasons for the order. “All are strictly advised to adhere to this new directive.”

Persecution of homosexuals had come as a sort of prelude to this latest move. In recent years they have been the target of new discriminatory legislation, arbitrary detention, and mistreatment in The Gambia. After an “aggravated homosexuality” law was passed in October 2014, imposing a life sentence for several offenses, dozens of LGBT people fled the country.

“The new law treats consensual, private sexual activity between adults of the same sex—which should not be a crime—in the same way as rape and incest,” Steve Cockburn, deputy regional director for West and Central Africa at Amnesty International, said at the time.

“The vague and imprecise provisions of this law could be used to arrest and detain anyone who is believed to be gay or lesbian, and contributes to the already severe climate of hostility and fear for LGBTI people in the country,” said Cockburn.

Jammeh has never hidden his dislike for gay people. The Gambian leader was recently quoted as saying animals are more godly than gays and that if the West wants gays so much, “they should just put planes at the airport” and he “will be happy for them to leave.”

“I have the largest number of pigs and cattle, and I have never seen a male pig climbing on top of another male pig or a male cattle climbing on top of another male cattle,” Gambia’s leading Freedom Newspaper quoted him as saying during the state opening of the country’s parliament on March 31. “I will rather die than to allow it [homosexuality] to happen in Gambia. If they want to perpetrate it, we will be merciless.”

Following Jammeh’s declaration of Islamic statehood, the country’s Supreme Islamic Council (GSIC), a group of scholars, went around the country stirring up popular support for the development. The president said legislation to enforce his declaration would soon be introduced into parliament and the national flag would be changed to reflect the country’s new status. The national broadcaster has already taken to referring to The Gambia as the “Islamic Republic.”

Jammeh has painted critics of his regime as neo-colonialists, and in the last 2½ years has withdrawn The Gambia from the British Commonwealth, saying Britain did nothing for Gambia in 300 years of colonialism, except “to tell us how to sing ‘Baa Baa Black Sheep’ and ‘God Save the Queen.’” Jammeh also scrapped English as an official language.

One senior Gambian official, while on a visit to Nigeria’s commercial capital, Lagos, in December, told The Daily Beast that the government was considering plans to put the issue of full Sharia implementation to a referendum.

“We are likely going to let the people decide on this,” he said. “It is what the government is seriously looking at.”

Jammeh’s Islamist ploy is almost certainly aimed at winning the support of Arab Gulf states, particularly Kuwait, Qatar, and Bahrain, whose cash the president is thought to covet. Support from the West, meanwhile, has dwindled, with international bodies, especially the European Union, withholding aid because of human-rights abuses.

Last June, Jammeh expelled the EU’s top diplomat to Banjul, Agnes Guillard, without giving any explanation, although the action came six months after the EU blocked some $11 million in aid to The Gambia because of its anti-gay laws.

Since taking power in a bloodless coup in 1994, Jammeh has ruthlessly repressed all forms of dissent while seeking to rule The Gambia through what can only be called mysticism, even claiming to cure a number of ailments, including obesity and erectile dysfunction.

In 2007, Jammeh claimed to have invented his own herbal cure for HIV—but it could only be taken on a Thursday, and his treatment required that patients give up conventional retrovirals.

A report by Human Rights Watch (HRW) released in September 2015 said Gambian security forces frequently arrest people without charge, often detaining them secretly for months and even years.

Political detainees, critics of the president or the government, perceived supporters of the opposition, and those allegedly implicated in coup attempts are often subjected to torture and other ill treatment. In one incident, dozens of people were arrested and allegedly tortured after a coup attempt in December 2014.

As recently as Saturday an opposition activist, Solo Sandeng, died in detention shortly after his arrest for participating in a peaceful protest, according to Amnesty International, which called for an inquiry into the death.

Sandeng was the National Organizing Secretary of the opposition United Democratic Party (UDP) and was detained during a march calling for electoral reforms on Thursday, ahead of national elections in December.

Another activist from the opposition, Fatoumata Jawara, who was detained with Sandeng on the same day, is believed to have serious injuries, Amnesty said.

Several senior opposition leaders were arrested on Saturday after taking to the streets along with hundreds of their supporters, demanding answers from the authorities. Witnesses said protesters were swiftly rounded up by Gambia’s security force, which fired tear gas at the crowd.

The U.S. State Department issued a statement Sunday saying it “condemns the Government of The Gambia’s severe response to recent peaceful protests.

“The tragic death in detention of Solo Sandeng must leave no space for impunity. The authorities must conduct an immediate, thorough and independent investigation,” said Sabrina Mahtani, Amnesty International West Africa researcher.

“Gambia must uphold the rights to freedom of expression and peaceful assembly, especially in advance of the elections. All of the peaceful protestors arrested by the authorities should be immediately and unconditionally released. Any who are injured must receive urgent medical treatment.”

The Gambia’s National Intelligence Agency (NIA), a paramilitary group known as the “Jungulers,” and armed units of the Gambian Police Force have been implicated frequently in the country’s abuses, according to the HRW 2015 report.

“When [Jammeh] wants to torture you, he uses the Jungulers team to torture you,” a former Junguler told HRW. “Or if he wants to arrest you secretly, he uses this Jungulers team. Or when he wants to kill you without anyone finding out, they will just kill you and throw you [away].”

In one bizarre incident after the president’s aunt fell ill, security forces rounded up more than 1,000 villagers on suspicion of witchcraft and force-fed them hallucinogenics. Groups of Jungulers and government-hired sorcerers then systematically raped the female detainees during subsequent “witch trials,” according to HRW.

Press freedom is almost nonexistent in The Gambia. Government oppression of the media is seen as a deliberate attempt to prevent negative information about the country from reaching the outside world. Dozens of journalists have fled The Gambia under Jammeh’s rule.

“The president believes he has the backing of the Muslims in the country,” a Gambian journalist working in one of the country’s leading newspapers told The Daily Beast privately. “He doesn’t give a damn about the non-Muslims. They can’t even help him win an election.”

Sadly, some of The Gambia’s leading Muslims see Jammeh’s recent proclamations as appropriate for a country where about 90 percent of the citizens practice Islam.

On Jan. 6, officials of the GSIC and the Banjul Muslim Elders visited the State House to express their “appreciation and support” for the declaration that The Gambia is an Islamic republic. Muhammad Lamin Touray, president of the GSIC and imam of State House Mosque, was quoted saying, “The Gambia Muslim community views the move as Allah’s additional bounty to the country and the people.”

“Jammeh doesn’t even know the meaning of ‘Islamic state’ and how a country can take up that status,” the journalist said. “He just got up one morning and took the decision, and he may not have consulted with his cabinet.”

Indeed, Jammeh may not have consulted widely at all before making his December pronouncement. When members of the GSIC visited State House on Jan. 5, Vice President Isatou Njie-Saidy urged them to carry out research into the exact requirements of an Islamic Republic, suggesting he, too, may be uncomfortable with the manner in which Jammeh made the declaration.

Many in the formerly secular nation see the president’s actions as aimed at attracting voters while he prepares to seek a fifth term in office in the next presidential election, scheduled for December this year.

“He knows the forthcoming election will be a difficult one for him,” said another of the country’s leading journalists, who asked not to be named for fear of government retaliation. “Muslims in Gambia are so passionate about their faith, and by invoking Islam in his rule, Jammeh wins over his people.”