Image caption Japanese actors Saori Hara (top) and Hiro Haayana star in the film

A 3D erotic comedy has taken the Hong Kong box office by storm, beating the first-day record set by Hollywood blockbuster Avatar.

Sex and Zen: Extreme Ecstasy took HK$2.78m (£219,000) on its first day last week, compared to James Cameron's epic which earned HK$2.63m (£207,000).

The film has now taken HK$17m (£1.34m) in the five days since its release.

Takings have been boosted by an influx of viewers travelling from mainland China where it is not being screened.

Sex and Zen - a remake of a 1991 Hong Kong movie by the same name - tells the story of a sexually frustrated scholar in ancient China who loses himself in the harem of a duke he befriends.

The Cantonese production features Japanese porn stars Hara Saori and Suo Yukiko and Hong Kong actress Vonnie Liu.

In Taiwan, the film also earned TWD$17m (£360,000) in its opening weekend - the best for a Chinese-language movie in Taiwan this year, producer Stephen Shiu said.

As China does not have a film ratings system - enabling movie-goers of any age to see any film - it bans erotic content in cinemas.

It is not the first time mainland viewers have travelled to Hong Kong to evade censorship by Chinese authorities.

Many crossed over to watch the uncut version of Oscar-winning Taiwanese director Ang Lee's sexually explicit 2007 spy thriller Lust, Caution.