If you've ever taken medication or received a surgical implant, thank a horseshoe crab. Although they look prehistoric, these sea creatures have become essential to modern medicine.

Every drug certified by the FDA — as well as every implant and prosthetic device — must be tested using an extract from the animal's milky blue blood.

Horseshoe crabs have a primitive immune system, so they fight off infection with a compound in their blood called Limulus Amebocyte Lysate. LAL binds and clots around fungi, viruses and bacterial endotoxins, protecting the crabs from infection.

This compound is the basis of the LAL test, the international standard screening test for bacterial contamination. It can detect toxins — even at a concentration of one part per trillion — and if any are present, the blood extract traps them, turning the solution into a gel-like substance.

Where does all the blood come from?

With every drug requiring LAL testing, the pharmaceutical industry requires a lot of horseshoe crab blood. In fact, it's estimated that the worldwide market for products based on the LAL test is more than $200 million.

Raising horseshoe crabs in captivity is problematic because over time, the quality of blood declines. Therefore, wild crabs are caught, bled and returned to the sea each year.

In 2012, more than 610,000 of the animals were harvested for biomedical purposes.

Horseshoe crabs live on the seafloor near the shore and swim to shallow waters to mate. This is when collectors wade through water to gather them.

When the crabs arrive at a lab, the tissue around their hearts is pierced and 30 percent of their blood is drained. The blood can sell for up to $15,000 a quart.

When the process is complete, the horseshoe crabs are returned to the ocean far from where they were collected to avoid rebleeding.

Once returned to the sea, the crab's blood volume rebounds in about a week, but it takes two to three months for the animal’s blood cell count to return to normal.

Studies show that 10 to 30 percent of the bled crabs die.

What effect does this have on horseshoe crabs?

Although horseshoe crabs aren't classified as an overfished species, since 2004, the population has been declining in New England, the area where most crabs are collected.

Some studies have linked the decline to climate change, but researchers say the biomedical harvest could be affecting an already vulnerable population.

In regions where the crabs are collected in large numbers, such as Pleasant Bay, Mass., fewer crabs are showing up to spawn.

"We reasoned if you take a fair amount of blood out of animals and transport them for two to three days and it occurs during the peak of the breeding season, these animals may be out of commission, behaviorally, for awhile," Christopher Chabot, a professor at Plymouth State, told Boston.com.

Scientists at the University of New Hampshire and Plymouth State University started looked into the matter and found that the bled crabs are more lethargic and less likely to follow tides.

They collected 56 female horseshoe crabs from Durham, N.H., and fitted them with devices to measure their movement. After determining the crabs' baseline activity, they re-created the biomedical harvest procedure.

Researchers found that the crabs became lethargic after bleeding and that the quality of their blood decreased, which could affect their ability to fight off infections. They also learned that the bled crabs are less likely to follow tides.

Eighteen percent of the crabs in the study died.

"Their behavior changed significantly for as much as two weeks after they're captured and bled," Chabot said. "Breeding season is only four weeks long. If they’re captured and brought back, perhaps they don’t breed."

Further research is necessary to determine how significant an effect the biomedical harvest has on horseshoe crab populations.

While research is underway to create a synthetic substitute for the animals' blood, for now the ancient creatures will continue to be collected and bled.

Related on MNN: