In a secretly shot video, a Chinese farmer holds up a bag of yellowish bile he has just extracted from a caged bear.

"Some Westerners say this is cruel - but I think the bears are making a contribution to mankind," says the grinning man.

Animal welfare groups have recently stepped up their campaign to end the practice of milking bears for their bile, still legal in China.

They say the animals suffer enormous physical and psychological pain.

But bear bile has been used in traditional Chinese medicine for hundreds of years and it is not proving easy to change habits formed over generations.

Pharmaceutical companies that farm bears are also fighting back to protect their industry, in a public relations battle to win hearts and minds.

Bear bile is a digestive fluid produced in the liver and stored in the gall bladder.

It is valued in traditional Chinese medicine because it is supposed to fight fever, cleanse the liver and improve vision.

Made into a powder, it sells for at least 130 yuan ($21; £13) a gram.

Permanent hole

Previously, bile was taken from animals caught in the wild, but China's dwindling number of bears forced a change in the 1980s.

"They figured that by putting these bears in their cages and milking them for their bile, they could help the wild population," said Dr Jill Robinson, founder of the Hong-Kong-based campaign organisation Animals Asia.

Image caption Bear bile has long been used in traditional Chinese medicine

But she said this had not helped because farmers were now catching wild bears and putting them in cages.

The conditions in which many bears are kept have led to an outcry from campaigners in China and across the world.

Many bears are held in small cages for years on end and are sometimes milked three times a day using the "free drip" method.

This means bears have a permanent hole in their abdomens, through which the bile drips out. Sometimes a tube is inserted to help the liquid flow.

"It's an unconscionably cruel practice that involves a substance that can easily be replaced by herbs and synthetic products," said Dr Robinson.

Chinese journalist Xiong Junhui was so incensed when she reported on this industry for a story that she decided to make a film.

Posing as interested tourists, she and two colleague visited bear farms across the country to secretly document what went on there.

It was her film in which the grinning bear farmer explains his belief that these bears are helping society.

The film was shown at a recent press conference held by Animals Asia in Beijing to drum up support for its campaign to end bear farming.

It showed a number of distressed-looking bears in tiny cages, some of them with metal contraptions fastened around their bodies.

"Chinese people simply don't know that for years we've been extracting bile from caged bears and that this business is legal in China," said Ms Xiong, whose name means "bear" in Chinese.

She hopes that people will see her film and help to end this practice.

Endangered species

Ms Xiong will find many in China who support her cause. There is a growing awareness about animal welfare issues, with recent campaigns to stop Chinese people eating dog meat and shark's fin soup.

But the industry is fighting back.

There are currently several dozen firms that harvest bear bile, extracted from up to 10,000 captive animals.

Image caption Guizhentang Pharmaceutical opened its doors to journalists in a bid to quell criticism

Guizhentang Pharmaceuticals, based in Quanzhou in Fujian Province, is one of them. It has nearly 500 endangered moon bears.

It wants to list on the Chinese stock exchange to raise money to increase the number of bears it farms for their bile.

That led to outrage from campaigners and a petition, signed by a number of well-known individuals in China, to block the move.

Last week the company opened its doors to journalists - the BBC was not allowed in - to counter claims that its business is cruel.

Reporters were shown bears playing in a pit and others being milked for their bile by workers dressed in face masks and protective clothing. The bears appeared comfortable and unconcerned by the procedure.

At a news conference, company director Zhang Zhijun said making a hole in a bear's abdomen was no different to "piercing people's ears".

Campaigners contest this claim, and the public seem sceptical too.

The head of the China Association of Traditional Chinese Medicine, Fang Shuting, recently suggested that extracting bile from a bear was as easy as getting water from a tap.

It immediately led to a storm of protest on Chinese internet sites. "Why don't you go and extract bile yourself. Then you can tell us how good you feel," wrote one irate blogger.

If this is the public mood, bears farmers will have to work hard to prove that their industry is both necessary and ethical.