While tequila is essentially fun, tasty poison, blue agave—the plant that it’s made from—could have some surprising health benefits, like fighting osteoporosis.

Tequila is good for a lot of things—like getting totally blitzed and inducing deathly hangovers. But while tequila is essentially fun, tasty poison, the plant that it's made from could have some surprising health benefits.

According toScience Daily, a researcher from Mexico says that the blue variety of the agave plant used to make tequila could actually strengthen bones and fight osteoporosis.

Mercedes López, a scientist at the Center for Research and Advanced Studies of the National Polytechnic Institute in central Mexico, says that her research has shown that substances in Agave tequiliana, or blue agave, can improve the absorption of calcium and magnesium—minerals vital for bone health. López induced osteoporosis in mice by removing their ovaries, then fed them fructose molecules from blue agave. Eight weeks later, mice who ate agave had nearly 50 percent more osteocalcin—a protein that signals the production of new bone—even though they had osteoporosis. Their bones were also greater in diameter than bones of mice with osteoporosis who didn't eat agave.

When the agave makes its way to the gut, microbiota—all the trillions of fun little bacteria that live in your gross stomach—ferment the agave, which is then better able to transport other minerals in the digestive system throughout the body. Ultimately, that led to stronger bones in mice.

"This way, we have a second chance to take advantage of the nutrients that were no longer available to the body," López said. Lopez has applied for a patent to develop agave into a treatment, which she hopes can be used to help the 200 million people globally who have weak and brittle bones due to osteoporosis.

But that's not it for agave's potential health benefits: In 2014, López found that a natural form of sugar in agave known as agavins could help people with diabetes lower their blood sugar. Agavins aren't digestible, so eating them doesn't raise blood sugar, as normal sugar does.

Agavins could also help obese people lose weight. In a study, mice who were fed agavins also ate less, as consuming agavins leads to a feeling of fullness. The only downside is that they aren't as sweet as some other sweeteners. López noted that agavins are not the same as agave syrups, which don't have the same health benefits.

Unfortunately, this doesn't mean you should go out and chug tequila if you're a diabetic person with osteoporosis: Do that and you'll likely wind up with a new health concern to deal with.