DENVER (AP) -- Medical and recreational marijuana may be legal in Colorado, but employers in the state can lawfully fire workers who test positive for the drug, even if it was used off duty, according to a court ruling Thursday.

The Colorado Court of Appeals found there is no employment protection for medical marijuana users in the state since the drug remains barred by the federal government.

"For an activity to be lawful in Colorado, it must be permitted by, and not contrary to, both state and federal law," the appeals court stated in its 2-1 conclusion.

The ruling concurs with court decisions in similar cases elsewhere and comes as businesses attempt to regulate pot use among employees in states where the drug is legal. Colorado and Washington state law both provide for recreational marijuana use. Several other states have legalized medical use.

The patchwork of laws across the nation and state-federal conflict has left the issue unclear. Based on this ruling, employees who use pot in Colorado do so at their own risk. In Arizona, however, workers cannot be terminated for lawfully using medical marijuana, unless it would jeopardize an employer's federal licensing or contracts.

The Colorado case involves Brandon Coats, 33, a telephone operator for Englewood, Colo.-based Dish Network LLC. Coats was paralyzed in a car crash as a teenager and has been a medical marijuana patient in the state since 2009.

He was fired in 2010 for failing a company drug test, though his employer didn't claim he was ever impaired on the job.

Coats sued to get his job back, but a trial court dismissed his claim in 2011. The judge agreed with Dish Network that medical marijuana use isn't a "lawful activity" covered by a state law intended to protect cigarette smokers from being fired for legal behavior off the clock. According to the National Conference of State Legislatures, more than half of all states have such laws.

Dish Network did not return a call seeking comment.

Story continues

Coats' attorney, Michael Evans, plans to appeal and issued a statement saying the ruling has wide implications.

"This case not only impacts Mr. Coats, but also some 127,816 medical marijuana patient-employees in Colorado who could be summarily terminated even if they are in legal compliance with Colorado state law," Evans noted.

Judge John Webb dissented in the split decision, saying he couldn't find a case addressing whether Colorado judges should consider federal law in determining the meaning of a Colorado statute.

Marijuana supporters say the courts are discriminating against them because Colorado's Lawful Off-Duty Activities law, the provision protecting cigarette smokers, prevents workers from being fired for legal behavior off the clock.

The court said lawmakers could act to change the law to protect people who use marijuana, but there have been no plans to do that at the state Capitol.

Coats told reporters Thursday afternoon that he obtained a prescription for medical marijuana to deal with debilitating muscle spasms that would otherwise prevent him from working. He has been looking for a job ever since being dismissed by Dish.

"I'm not going to get better anytime soon," said Coats. "I need the marijuana, and I don't want to go the rest of my life without holding a job."

The Washington state Supreme Court also has found that workers can be fired for using marijuana, even if authorized by the state's medical marijuana law.

Last year, a federal appeals court ruled against a cancer survivor in Battle Creek, Mich., who was fired from his job with Wal-Mart Stores Inc. after failing a drug test for marijuana. Joseph Casias had a medical marijuana card and said he used pot to alleviate symptoms of an inoperable brain tumor.

According to the Marijuana Policy Project, the California Supreme Court also has ruled that people could be fired for testing positive for marijuana. The Legislature passed a bill to change that in 2008, but it was vetoed.

___

Associated Press writers Colleen Slevin, Peter Banda, Nicholas Riccardi and Eugene Johnson contributed to this report.