TV science presenter Michael Mosley lived with tapeworms in his guts for six weeks for a documentary - and found he piled on the pounds.

The parasites were for many years thought to be a weight-loss aid to past generations, with Victorian women swallowing their eggs to get thinner.

But Mosley found he actually gained around 2lb during his stint as a human guinea pig for a BBC4 programme to be screened next month.

He has also revealed that health and safety regulations meant the BBC cleared him to consume the tapeworms - which can grow up to 100ft in length in the intestines - but drew the line at him deliberately getting head lice, even though it affects millions of schoolchildren each year.

Mosley - who has made a number of films about diet and exercise among his documentaries - examines the effects in a film called Michael Mosley: Infested! to be screened next month as part of the channel's Natural History season.

He said his weight gain could have been caused by the need to increase his intake as a result of the parasites living in his guts.

"I was keeping a food diary to see if my food preferences changed. I think I probably ate a bit more chocolate. Tapeworms like beer and chocolate - they like carbohydrates. My weight if anything went up a bit. One of the theories is that the tapeworm probably encourages you to eat more. You feed it."

Mosley tracked down the tapeworm at an abattoir in Nairobi in Kenya and ate cysts from the tongue of an infected cow, cutting away the meat surrounding them to avoid any infection. In order to be sure of a good hit rate for the worms he ate three cysts, all of which developed into worms.

"It's not something you can easily lay your hands on," he said.

"My wife's a GP and she was not very keen but she said it was OK because beef tapeworm is relatively innocuous. And also it is not infectious."

The beef tapeworm makes its home in the intestine but the far more dangerous pork tapeworm moves around the body and can cause brain cysts in humans.

Scientists have been increasingly fascinated by the effects of parasites on the human body and it has become widely accepted that their eradication in most parts of the world has led to a rise in allergies and many other conditions.

Mosley said he was motivated because he was interested in parasites and had never knowingly been infested before he began filming. His experiences will also be used by scientists who are aiming to develop a simple test to see if people are carrying worms.

"I like finding out stuff through my personal experience of it. They get very few people who are prepared to be infected by tapeworms. Hopefully my faeces will contribute at some time in the future to a better test," he added.

Six weeks after swallowing the cysts the activities of the worms were monitored in his guts by a camera which he swallowed, allowing him to see what was going on by looking at his iPad.

"There was a time when Victorian ladies would swallow tapeworm eggs in the hope that it would help them lose weight, but this was actually a fallacy because the eggs are not infectious to human beings - they are only really infectious to cattle.

"It is part of the peculiar life-cycle of the beef tapeworm that when you pass segments and eggs, they have to be eaten by a cow before they become infectious."

Producer Nathan Williams said that BBC policies allowed Mosley to consume the tapeworm because it could not be passed from human to human, but parasites such as pinworm and head lice fell foul of guidelines. However, he was allowed to experiment with the lice as long as they were placed on his arm.

"It's fine to eat a tapeworm but they wouldn't let us have a pinworm even though 40 per cent of the children in the UK have it. Similarly they wouldn't let us give head lice in the hair because you might give it to other people and it wouldn't be fair to infect Michael's family and his friends."

The tapeworms were killed off using pills, although the team had not been able to trace the bodies being expelled from Mosley's body.

The presenter said: "Nothing came out. There are two possibilities: the most likely possibility is that the pills killed the worms and my body digested the tapeworms which is an ironic end - parasite gets eaten by its host, which is most likely. The second possibility is they are still there, but since it is about 13 weeks since I swallowed the cysts, I think I would have noticed by now."