EVEN before they enter the Asmoro bar, a nightclub in central Jakarta, patrons can hear the music. A regular beat—dang, dut, dang, dut—spills out, only slightly muffled, onto the street. Inside the smoky, dimly lit space, women in tight mini-dresses and teetering heels stand by a stage where nine men play various instruments. Occasionally one woman, known as a “waitress” although she appears to do little waitressing, breaks into song, usually accompanied by one of the male visitors to the bar. At other points the women sway to the music as customers slip them wads of cash, flashing disco lights illuminating them momentarily in the darkness.

On the other side of the city, around a thousand people sit in a television studio owned by Indosiar, a private TV station. They are there to watch the recording of “Liga Dangdut”, a show that started on January 15th. It involves 170 contestants competing to be the best dangdut singer. Male and female performers in sequinned outfits or brightly coloured regional costumes shiver backstage in the freezing air-conditioning. They sing songs like those heard in the bar, often in their local dialects, the crowd whooping and swaying with them. The show lasts for five hours, and is broadcast almost every day. It will run until May.

Dangdut is Indonesia’s closest answer to American country music, says Indra Yudhistira of Indosiar. Younger singers croon about heartbreak and romance. Older ones warble about religion, alcoholism and poverty. The music appeals particularly to the rakyat, the people (as opposed to the elite), especially in the countryside. As with country music, it is used by politicians at rallies to drum up support from voters. Already several high-profile dangdut singers have been lined up to play at campaign rallies ahead of the regional elections in June.

But unlike much that comes out of Nashville, there is a strain of dangdut that often surprises foreigners. Much of it is unashamedly erotic, despite various attempts by hardline Muslim groups to censor it. Its enduring popularity hints at the diversity and tolerance of the world’s most populous Muslim-majority country.

Although dangdut has been around since the 1930s, it really started to take off in the 1970s as more Indonesians began to watch television, according to Andrew Weintraub of the University of Pittsburgh, who has written a book on it. Originally it was heavily influenced by Indian music, since Sukarno, the first president of Indonesia, banned the distribution of Western music and films. But as Indonesia went through various political transformations—falling under the dictatorship of the unashamedly pro-American Suharto, then becoming a democracy—the genre took on different styles and influences. Throughout, it has remained enormously popular. According to one poll, fully 58% of Indonesians say it is their favourite kind of music, ahead of the mere 31% who like pop.

Much of dangdut’s appeal, however, lies not in its infectious beat but in the allure of the performers who sing it, particularly if they are female. Although it has roots in Indonesian folk music, for the past two decades dangdut has become ever more raunchy. Women wear tight-fitting or skimpy clothes at outdoor music festivals and in clubs. In many performances, men in the audience jiggle their hips too, but also hand out cash to the women as if to a stripper. Many venues sell alcohol, cigarettes and, in some cases, sex.

Mostly, though, performances are simply suggestive. Inul Daratista, a dangdut artist who was particularly popular in the early 2000s, rose to prominence thanks to a signature move known as “drilling”, in which she frantically gyrates on stage. One video, which has been viewed 3.9m times on YouTube, shows Ms Inul wiggling her hips suggestively with her back to the audience, who eagerly look on. Until a dangdut singer died of a snake bite in 2016, many used cobras as props too.

These uninhibited performances have not gone unchallenged. In 2003, after Ms Inul performed her drilling movement on television, a coalition of Islamic groups spoke out against her. She was also denounced by Rhoma Irama, an Islamic preacher and singer known as the “King of Dangdut”, who is planning to run for president next year. She is said to have been one of the inspirations for the anti-pornography law of 2008, which bars the distribution of images of anyone “dancing or moving in an erotic fashion”.

In the end, however, it seems to be capitalism, not fundamentalism, that is toning dangdut down. Indosiar’s Mr Yudhistira describes how, when he and his colleagues decided to create a dangdut competition in 2014, they wanted to make it more appealing to middle-class families. They gave singers more demure outfits, put them on sparkly stages and changed the content of their songs to make them more “poetic”. He even found a clean-cut way to include Ms Inul, whose career was not unduly damaged by the drilling episode: he made her a judge on one of his shows.

Yet away from the television screens, much of the original, rebellious and lascivious spirit of dangdut can still be found across Indonesia, in bars, seedier clubs and at spontaneous outdoor concerts set up by youngsters wanting to have a good time. At the Asmoro bar, the woman on the door claims that at least one girl who has sung there has gone on to have a successful career as a more mainstream singer. “Dangdut will never die,” insists Ms Inul. “Dangdut is Indonesia’s music.”