The Colorado Supreme Court heard opening arguments Tuesday in a case that will decide whether employers can fire workers for smoking marijuana, even though use of the drug is legal in the state. The ruling in the case could set a precedent that may influence courts in other states with medical and recreational marijuana laws.

The Colorado case began in 2010 when Dish Network fired 35-year-old Brandon Coats because he tested positive for marijuana in a random drug screening. Coats, who is quadriplegic, sued, saying he uses medical marijuana to help him sleep and combat spasms.

Dish Network claims it is complying with federal law, which still outlaws pot, even for medical use. Colorado's lower courts agreed with Dish, prompting Coats to appeal to the Supreme Court.

Colorado voters approved a medical marijuana law for the state 2000, and voted to allow recreational use for adults in 2012. Both laws stand in direct opposition to federal drug regulations, but the Department of Justice has so far declined to intervene.

Despite marijuana's legality in Colorado, businesses in the state are free to implement whatever drug policies they see fit. In fact, the state's medical-marijuana statute explicitly states that nothing about the law "shall require any employer to accommodate the medical use of marijuana in any work place."

But Coats and his attorney argue that a separate state law protects workers by blocking employers from firing people who partake in pot outside the workplace. Colorado's "Lawful Activities" statute says it is discriminatory for employers to terminate workers for "engaging in any lawful activity off the premises of the employer during nonworking hours."

The murky definition of the word "lawful" in this case is what makes things complicated. The Colorado Court of Appeals said in a decision last year that if smoking weed is permitted by the state, but forbidden by the feds, it cannot be considered lawful "under the ordinary meaning of the term."

Vance Knapp, a Denver lawyer who represents employers, said the federal ban on marijuana makes it difficult for Coats and his lawyers to prove that his toking was technically lawful.

"Dish's lawyer and the Colorado attorney general will argue that, by definition, it can't be lawful if it's not lawful under federal law," Knapp told VICE News. "You really have to take a constrained view of the definition of lawful to reach the definition that Mr. Coats wants."

Knapp said he doesn't expect the Supreme Court to overturn the appellate decision, because of the strength of federal law and because both Colorado marijuana amendments — medical and recreational — give employers discretion to set marijuana rules.

"It would be a lot different if it were lawful under federal law," he said. "Then Mr. Coats would have a good claim to use the Lawful Activities statute."

If the arguments proceed without delay, Knapp said expects the Supreme Court to hand down its decision within six to eight weeks.

Sam Kamin, a University of Denver law professor, also said he expects the court to uphold the appellate decision and side with Dish Network, but added that he thinks this case could spark debate on changing the "Lawful Activities" statute to say employees can't be fired for getting high off the job.

"The statute can always be amended," Kamin said. "That would resolve the interpretation issue here. Even if Mr. Coats loses this argument, it opens the door to fix the wording."

Currently, 23 states allow medical marijuana use, and this case likely will set a precedent for how employers can deal with marijuana use, even when state law allows it.

"If this decision holds, it will provide comfort to companies with a zero-tolerance drug policy that they can continue that policy," Knapp said.

Follow Payton Guion on Twitter: __@PaytonGuion