Taliban insurgents beheaded 17 people at a party in southern Afghanistan on Sunday night. The attack may have been part of a power struggle between rival factions, but one government official said it was intended to punish the attendees for listening to music and dancing.

Are music and dance prohibited in Islam?

The prophet Muhammad made seemingly contradictory statements about the performing arts, providing justification for people on either side of this doctrinal dispute. According to some accounts, Muhammad promised that Allah would turn musicians into "monkeys and pigs." On special occasions, however, he seems to have enjoyed a little music.

These ambiguities have led to divisions within Islam over the status of music and dancing. One split is sectarian in nature: Fundamentalist Salafists and Wahhabis generally view music and dancing as haram, forbidden, while moderate believers accept them as halal, permissible. Mystical Sufis are the most dedicated dancers in the Muslim world, embracing whirling and other trancelike movements as a way to draw closer to Allah.

Another division is based on class. Urban elites have historically refrained from dancing, viewing it as frivolous and beneath their dignity. The rural Muslims who account for the majority of the faithful, however, have developed rich dance traditions.

Until about 30 years ago, dancing was de rigueur at rural Muslim weddings around the world. In Afghanistan, for example, Pashtun men have traditionally circled up to perform an ancient ritual dance, the attan.

At other gatherings, martial dances are traditional. Stick-wielding Yemeni villagers dance the shabwani, while men in the United Arab Emirates grasp one another's waists to simulate combat in the razfa. There are also exclusively female dances in the Muslim world, like the stamping muradah traditional in Qatar, Bahrain and Saudi Arabia, and couples dances, such as the flowing sharh of Yemen.

Anti-dance sentiment surged in the 1980s, as Saudi Arabian elites began to aggressively export Wahhabism. Saudi investors have bought the contracts of well-known Egyptian belly dancers, paying them to recite Quranic verses rather than swivel their hips on television. (Belly dancing appears to be a pre-Islamic art form that has survived in more secular countries such as Egypt and Turkey.) Taliban militants have banned dancing at wedding parties, although some observers believe the move is meant to stamp out tribal traditions.

While moderate Muslims generally don't object to music and dancing per se, a large portion of the faithful view sexually suggestive movement, racy lyrics, and unmarried couples dancing together as haram, because they may lead to un-Islamic behavior. This viewpoint resembles the anti-dance feeling common among American Christians at various times in U.S. history. The Puritan minister Cotton Mather wrote in the 17th century that dancing was a creation of the devil, and warned that a "Christian ought not to be at a ball."

In the early 20th century, a new generation of pamphleteers railed against dance. Consider the 1909 tome The Christian and Amusements, by Presbyterian evangelist William Edward Biederwolf. Just as today's Saudi fundamentalists blame pre-Islamic cultures for belly dancing, Biederwolf claimed that "the mingling of the sexes in dancing originated in Greece among men of contaminated morals and women of loose, questionable character."