Though Coloradans voted to legalize marijuana for medicinal use nine years ago, certified medical-marijuana users, many of whom are battling chronic pain, are being evicted from federal housing.

That’s because federal law categorizes marijuana as an illegal drug.

Two Colorado men are fighting such evictions in court and similar battles are taking place in 13 other states that allow medical-marijuana use, according to The Post’s Nancy Lofholm.

Given earlier court rulings, it’s doubtful those battles will prevail for the evicted. That’s why we think elected officials in Washington should correct the conflict between state and national law.

“It’s safe to say this is a growing problem. We’re going to encounter it more,” said Brian Vicente, an advocate for medical-marijuana users.

To get a more poignant take on the situation, consider Bill Hewitt, one of the Colorado men fighting his eviction.

“It’s disgusting,” Hewitt told Lofholm. “Most disabled can’t afford a house, so they get assistance. These people should not be thrown in the street because they use a medication that alleviates pain.”

Hewitt suffers from muscular dystrophy. He claims smoking marijuana has replaced prescription painkillers that produced negative side effects.

Pot, he says, allowed him to toss tranquilizers, muscle relaxers, sleeping pills and other drugs in the trash. Hard — but legal — drugs such as morphine and Oxycontin also are painkillers that medical-marijuana advocates claim can be shelved in favor of pot.

Yes, we have concerns that a mushrooming use of medical marijuana by young men in Colorado, as earlier stories have shown, signals a system that is likely being abused.

Authorities ought to make sure certified users truly are deserving of the treatment. But that is a separate issue.

We understand that there could be a perception problem regarding the evictions. No one wants to think that their tax dollars are allowing someone to live on the government dole while getting high.

But evicting victims of chronic pain from federal housing or federally assisted housing seems cruel for exactly the reasons Hewitt articulated. Many are in need of housing assistance because of their pain and disabilities.

And what they are doing — smoking pot for medicinal purposes — is legal under state law.

No doubt, many of those in federal housing also are getting government money to buy prescription drugs, which comes at a cost to taxpayers.

If use of relatively inexpensive marijuana cuts a need for those prescription medications, isn’t that better for everyone?

The long and costly “war on drugs” creates these kinds of legal headaches. It would be much easier if marijuana use were legalized and regulated.

Another solution would be for Congress to create a federal medical-marijuana law like Colorado’s that applies to all states and territories.

Short of those measures, our representatives should create a federal housing exemption for those states that allow for medical-marijuana use.

Otherwise the legal conflicts are sure to continue, further tying up resources in our courts.