Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Pot may be legal in Colorado, but you can still be fired for using it.

The state Supreme Court ruled 6-0 Monday that a medical marijuana patient who was fired after failing a drug test cannot get his job back.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The case was being watched closely by employers and pot smokers in states that have legalized medical or recreational marijuana. Colorado became at least the fourth state in which courts have ruled against medical marijuana patients fired for pot use.

Supreme courts in California, Montana and Washington state have made similar rulings, and federal courts in Colorado and Michigan also have rejected such claims. The Colorado worker, Brandon Coats, is a quadriplegic who was fired by Dish Network after failing a 2010 drug test.

The company agreed that Coats wasn't high on the job but said it has a zero-tolerance drug policy. Coats argued that his pot smoking was allowed under a state law intended to protect employees from being fired for legal activities off the clock. Coats didn't use marijuana at work, but pot's intoxicating chemical, THC, can stay in the system for weeks.

A woman smokes marijuana during the 4/20 Rally at the Civic Center in Denver, Colorado, April 20, 2014. T Mark Leffingwell / Reuters, file

The Colorado justices ruled that because marijuana is illegal under federal law, Coats' use of the drug couldn't be considered legal off-duty activity. "There is no exception for marijuana use for medicinal purposes, or for marijuana use conducted in accordance with state law," the court wrote.

Coats and his lawyers said the decision at least clarified the matter for workers. "Although I'm very disappointed today, I hope that my case has brought the issue of use of medical marijuana and employment to light," Coats said in a statement.

Coats was paralyzed in a car crash as a teenager and has been a medical marijuana patient since 2009, when he discovered that pot helped calm violent muscle spasms.