KUALA LUMPUR, Malaysia — When he organized a get-together for dog lovers and their canine-averse neighbors, Syed Azmi Alhabshi thought he was doing a public service.

But after hundreds of people showed up to the event, billed as “I Want to Touch a Dog” on Facebook, and when pictures started circulating on the Internet of Muslim women in head scarves happily hugging dogs, Mr. Syed Azmi became an unwitting protagonist in the latest chapter of Malaysia’s culture wars.

In the week since the event, Mr. Syed Azmi, a pharmacist, has received more than 3,000 messages on his phone, many of them hateful and a dozen of them threatening physical harm. The police advised him to stay at home.

Malaysia’s Muslim leaders, who cite Islamic scriptures stating that dogs are unclean, lashed out at him in the news media. “I feel the anger, and it is real,” he said in an interview.