Marijuana remains controversial, despite now being legal for medical use in 31 states. In nine states, recreational use is permitted, too. Wondering if your doctor would approve? It turns out, they probably do.

The overwhelming majority — 80 percent — of health care providers say that medical marijuana should be legalized nationally, according to a recent poll of more than 2,000 physicians, nurses, and medical students conducted by Medscape. More than half (59 percent) also said that recreational marijuana use should be allowed.

Interestingly, it’s not just young medical students who favor legalizing weed. Nearly 60 percent of health care providers who took the survey are between ages 45 and 64, and another 26 percent are 65 or older.

Whether someone supports recreational use may very well rest on personal morals and opinions about whether prosecuting people who smoke pot makes sense for our society. But when it comes to medical use, there are a few facts that explain why so many health care providers are now saying marijuana is a useful option, at least for some patients.

Marijuana, also called cannabis, contains many different chemical compounds; two of the more well-known ones are cannabidiol (CBD) and tetrahydrocannabinol (THC). Using CBD alone (which doesn’t make you “high”) or in conjunction with THC (the psychoactive component) seems to help with a number of health issues.

According to the National Academies of Sciences, Engineering, and Medicine, there is “conclusive or substantial evidence” that cannabis is effective for treating chronic pain in adults. That might very well include arthritis-related pain, though more research is needed. Some recent studies have shown that CBD oil might help aches and pains associated with arthritis, but this research has mostly been done on animals.

If you are interested in trying cannabis and it’s legal in your state, talk to your doctor or another provider who’s experienced in this area. There are many different strains of the plant, and cannabis products contain varying ratios of CBD to THC (so they’ll impact your body differently).

You’ll also want to seek advice on how to use this drug: You may be surprised to learn that smoking a joint is the worst option if you’re trying to help your health, because the smoke contains toxic chemicals and can damage your lungs. An oral tincture or topical salve might be a better choice.

You should also check with your doctor to ensure that marijuana is safe for you and that it won’t interact with any other medications you take or have a negative effect on any other health issues you have.