People in mainly-Hindu Bali fear the law will target non-Muslims
Indonesia's parliament has passed an anti-pornography law despite furious opposition to it.
Islamic parties said the law was needed to protect women and children against exploitation and to curb increasing immorality in Indonesian society.
The law would ban images, gestures or talk deemed to be pornographic.
Artists, women's groups and non-Muslim minorities said they could be victimised under the law and that traditional practices could be banned.
The law has prompted protests across Indonesia, but particularly on the predominantly Hindu island of Bali - a favourite destination for tourists.
But there have also been demonstrations in favour of the bill by people alarmed at what they see as moral degeneration in Indonesia.
The law has been backed by hardline Islamic groups, says the BBC's Lucy Williamson in Jakarta, but many moderate Muslims also back greater controls on pornographic materials.
About 90% of Indonesia's 235 million people are Muslim, but there are Christian, Hindu, Buddhist and other minorities.
An original version of the bill would have banned skimpy clothing at tourist resorts.
Despite a lengthy and exhaustive revision process which watered down the bill, more than 100 legislators walked out of parliament before the vote.
They said the bill's definition of pornography was too broad and that it went against Indonesia's tradition of diversity.
Many Muslims back greater controls of pornographic material
Critics also do not like a provision in the bill that would allow members of the public to participate in preventing the spread of obscenity.
"We're worried it will be used by hard-liners who say they want to control morality," Baby Jim Aditya, a women's rights activist, told Associated Press news agency.
"It could be used to divide communities."
Supporters of the bill said it still leaves room for legitimate artistic expression and that it does not target non-Muslims.
"This law will ensure that Islam is preserved and guaranteed," said Hakim Sori Muda Borhan, a member of parliament from President Susilo Bambang Yudhoyono's Democratic Party.
"It is also not in the interest of any specific religion. The law is also meant to preserve arts and culture and not destroy them."
The bill must be signed by the president before it comes into effect.
Violators face up to 12 years in prison and hefty fines.