Image copyright Facebook / Alvin Tan Image caption Alvin Tan's video mocking the Islamic call to prayer has been viewed more than 400,000 times

Sex blogger, agent provocateur, trouble-maker - or freedom of speech activist?

These are all phrases that one of Malaysia's most infamous bloggers, Alvin Tan, uses to describe himself. He has a history of posts that have been highly divisive in the Muslim majority nation, and his latest stunt has involved once again offending Muslim sensibilities with a controversial Facebook post.

In the video, Tan, bare-chested and wearing sunglasses, plays the piano while singing a lyrically garbled version of the Azan - the Muslim call to prayer. Underneath the video, he has written: "Please don't badger me about the wrong lyrics ... First, this is a cover, so creative modification is permitted. Second, I ain't a suicide bomber."

It's been watched more than 400,000 times and, as might be expected, it has prompted extremely strong reactions, especially from Muslims. "Alvin Tan, shame on you!" one commented. "This is one of the [most] terrible insults I ever seen," another said. "Disgusting." Others, though were more complimentary. "Good effort … I'm Muslim & I'm not angry," read one comment. "One day you will be one of of us, brother."

Tan's posts expose the running debate in Malaysia about religion. About 60 percent of Malaysians are Muslim, mostly from the Malay ethnic group. But it's a multi-ethnic and multi-faith country, with significant Buddhist, Christian and Hindu minorities. More than a fifth of Malaysians are, like Tan, of Chinese ancestry. He justifies his statements by claiming to stand up for secular, liberal values - and says the fact he's been arrested for what he's posted shows how Malaysia doesn't guarantee freedom of speech.

But his views are certainly not universally popular among non-Muslims in the country. "Alvin Tan is going too far. But for sure, his behaviour & attitude doesn't represent Chinese community in Malaysia. So blame him, not the Chinese," one Twitter user wrote.

From a sex blog to jail

Tan, once a promising law student, and his ex-girlfriend, Vivian Lee, initially shot to fame after they posted a sex video, and then began a softer-core but still fairly explicit blog and YouTube channel. Their online activity was considered shocking by many in Malaysia, and they were soon drawing comparisons to the Kardashians.

They also used their notoriety to take provocative and deliberate aim at Muslim sentiments. Two years ago, on the eve of the Islamic holy month of Ramadan, they posted a picture of themselves eating a pork dish while sending holiday wishes to Muslims.

That photo, and the explicit content they posted online, got them arrested on charges of sedition. This is where his claims about free speech come in: Malaysia's sedition laws have been criticised by the US State Department (pdf) and by Human Rights Watch, in part because they can be used to prosecute those who criticise religion and offend believers.

Tan told BBC Trending that, in his view, he's being persecuted by the Malaysian government. "My intention was to expose the extremism and violence that have become commonplace in Malaysia for many years, so much so that the label 'model moderate Muslim nation' should no longer be bestowed upon her," he says.

Malaysia's government won't comment on the specifics of his case while it is still ongoing, and the authorities are seeking his extradition from the US. In the past, officials have said that legal restrictions on offensive speech are vital to maintaining harmony between Malaysia's different races and religions. One government adviser commented that delays in prosecuting Tan have already given too much space to others who "revile religion."

Tan has harsh words about Islam - at one point he compared it to Nazism - but he denies he is on a crusade against the religion. "I'm just fighting for true separation of mosque and state in Malaysia," he says. "Just because you slap the name of God or the label 'religion' on something, doesn't mean it's impervious to criticism. It doesn't mean it can't be discussed or analysed."

He's got a loyal following from some in Malaysia who see him as a sort of anarchist hero - but his popularity is far from universal. "If it was merely the Muslims in Malaysia you have sought to offend or despise," wrote a Catholic deacon, Rev. Sherman Kuek, "you are grossly mistaken in your reading of the Malaysian situation." Another said: "Stop disgracing Malaysian Chinese. It's because of idiots like you that Malaysia can't have racial harmony."

An American twist

But there's another twist in Alvin Tan's story: he's not actually in Malaysia any more.

While his girlfriend Lee remained in Malaysia to face trial, last year Tan fled to the US and currently lives in California. The couple have broken up and the fallout of the split has been avidly covered by Malaysian media. (Trending tried to contact Lee, but she didn't respond.)

His latest video, the "cover version" of the call to prayer, was posted by him from the US, and Tan freely admits that he hopes the controversy will stoke threats against him which could bolster his asylum application there. He told Channel News Asia: "If all else fails, I can easily publish more 'seditious' materials on my Facebook to taunt the authorities and get them to be hot on the pursuit of me again, therefore creating an even more well-founded fear of political persecution to bolster my asylum claim."

But in his interview with BBC Trending, he denied that he was only posting to improve his asylum claim, and described himself as a free-speech advocate: "If a country can be provoked into arresting you for saying things - no matter how vile or disagreeable the things that you say are - then essentially you do deserve asylum, because you've exposed what kind of country you're living in."

Image copyright Facebook / Alvivi Image caption The couple in happier times - the message next to this photo, posted on Alvin Tan and Vivian Lee's Facebook page, said: "On the way into the sex party"

BBC Monitoring's Tse Yin Lee says: "Malaysia is constantly debating what it means to be moderate. Some say Alvin is no different to religious extremists." But she adds that he does have a younger fan base who feel he voices their outrage over religion encroaching on their personal freedoms. "Many people have been furious of course - non-Muslims as well as Muslims. But many Muslims have also taken it in good humour, complimenting him on memorising the call, and saying his singing wasn't bad," she says.

Blog by Mike Wendling

Additional reporting by Mukul Devichand and Estelle Doyle

Next story: The Russian bikers who carry "make-up bags"

Follow BBC Trending on Twitter @BBCtrending, and find us on Facebook.