Doctors in Thailand's Nong Khai province have removed a 59-foot long tapeworm from a man.

The patient was suffering from stomach pain and flatulence before he decided to get checked up.

The 67-year-old man said that he didn't think that the problem was that serious. Doctors treating the man sent stool samples to the Parasitic Disease Research Centre in Nakhon Ratchasima province when their treatments proved to be ineffective in getting rid of symptoms.

The lab tests showed that the samples had contained more than 28 tapeworm eggs. Doctors immediately gave the man some deworming medicine before the giant parasite was ejected from his body.

Once the parasite was out, doctors were shocked at the size of the tapeworm, which had measured at 59-feet after it was unfurled.

"He was given the deworming medication before bedtime and in the morning this long worm came out of his bottom. It was very big and took us a while to lay it all-out on the ground," doctors at the Parasitic Disease Research Centre said.

Doctors said that the tapeworm was the biggest one they had ever found in the country in more than 50 years.

The man was given a clean bill of health after the tapeworm exited his body. Doctors gave him some medication and advised him to immediately change his eating habits. The man's family was asked to visit the hospital so that they can also be tested for parasites.

Dr. Schawanya Rattanapitoon from the research center said that this type of parasite typically comes from raw beef that was contaminated with tapeworm eggs. He said that people should avoid eating raw or undercooked beef.

Schawanya said that the type of tapeworm that was living inside the man's body was a species called Taenia Saginata - or usually known as a beef tapeworm. The parasite can live inside a human's gut for up to 30 years.

Doctors said that tapeworms often don't last very long inside a person's gut due to modern medications.