The first homegrown movie with gay themes to be shown in Malaysia has proved an unexpected box office success in the conservative Muslim country.

Opening less than a week ago, Dalam Botol (In a Bottle), about a post-op transsexual who comes to realise that she may have been better off as a man, has already earned more than one million ringgit (£206,000) at Malaysian cinemas, easily recouping its production and marketing costs of 970,000 ringgit. Prior to filming, writer and producer Raja Azmi Raja Sulaiman had to submit details to the country's strict censorship board, which nevertheless gave its approval following a couple of amendments.

Malaysian films are not allowed to show support for gay lifestyles: the country still maintains a law against sodomy, which is punishable by up to 20 years in prison, though prosecutions are rare. Dalam Botol offers a non-explicit vision of gay romance, featuring heterosexual actors who hug but do not kiss. However Sulaiman told the Associated Press she believed the box office results "prove that Malaysian audiences can handle such movies, that they're more open and not so conservative any more." She added: "I hope it'll inspire more films that are meaningful and linked to the reality of people's lives."

In Dalam Botol, a Muslim man undergoes a sex-change operation because he thinks it will please his boyfriend. Ultimately, both of them end up unhappy. Box office appears to have been heavily driven by controversy over the film, which has been at the centre of speculation that it might be banned. Azmi based the film on the experiences of a friend who had sex-change surgery in Thailand.

The film is not necessarily popular with Malaysia's gay community. "Many of us Malaysian gays, lesbians and transgenders have absolutely no regrets being who we are," said rights activist Pang Khee Teik, co-founder of the Malaysian sexual rights awareness group Sexuality Independence.

Azmi said her next film would most likely feature both gay and straight relationships. She plans a "fantasy drama" about a young man who prefers older partners but whose closest friend is a fish in a bowl that suddenly transforms into a man.