(Reuters) - The Colorado Supreme court on Tuesday heard arguments over whether employees can be fired for using medical marijuana, which is legal in the state but illegal under federal law.

The case was brought by Brandon Coats, a former customer service representative for Englewood, Colo.-based Dish Network who was fired in 2010 after testing positive for marijuana. Coats is quadriplegic as a result of a car accident and has a license to use marijuana to treat painful muscle spasms.

Coats claims that his firing violated a state law that prohibits employers from firing employees for engaging in "lawful" activities outside of work.

At Tuesday's argument, Colorado Supreme Court justices peppered attorneys for both Coats and Dish Network with skeptical questions, giving no hint of how they might resolve the contradiction between state and federal law.

Coats' attorney, Michael Evans, said that Coats had used marijuana only outside of work, and that there was no evidence that he had ever been impaired at work. Marijuana, he noted, can show up in drug tests for more than a month after a single use.

Evans argued that Colorado's constitutional amendment legalizing medical marijuana use, passed by voters in 2000, made Coats' use lawful.

Justice Gregory Hobbs Jr. asked him why the definition of "lawful" under the state employment law should not include federal law.

"When the Colorado legislature intends to include federal law, it does so expressly," Evans replied.

"We must always remember that state sovereignty is a fundamental part of this country," he added near the end of his argument.

Meghan Martinez, arguing for Dish Network, said the case "need not be an endorsement nor an indictment of medical marijuana."

Rather, she said, it was about the right of employers to maintain "zero tolerance" policies on drug use.

Martinez said it was impractical to ask employers to determine whether an employee who has used marijuana is impaired or not at work.

"What do you do if the employer and the employee don’t agree about the level of impairment?" she asked.

Chief Justice Nancy Rice asked why Colorado's amendment explicitly making medical marijuana use legal would not make it "lawful" under the employment law, to which Martinez replied that the federal Controlled Substances Act trumped state law.

Michael Francisco, an attorney for the state, spoke briefly at the end of the argument, agreeing with Dish's position.

State supreme courts in California, Montana and Washington have ruled against medical marijuana patients in similar cases.

Coats brought his suit in 2011 in Arapahoe County District Court. Judge Elizabeth Volz dismissed the case, finding the state's medical marijuana amendment created a defense against criminal prosecution but not a broader right to medical marijuana.

In April 2013, a Colorado Court of Appeals panel voted 2-1 to uphold that ruling, though on different grounds, finding that Coats' conduct was unlawful because it violated federal law.

The case is Coats v Dish Network LLC, Colorado Supreme Court, No. 2013SC000394.

(Reporting By Brendan Pierson; Editing by Alexia Garamfalvi and David Gregorio)