Early in the morning on Feb. 24, a large man with a long white beard and big cowboy hat gathered with about a dozen other people to pray outside the San Francisco branch of the United States tax court. In a kettledrum voice, Bryan Davies led the group in the Lord’s Prayer before asking, “If there is any evil here, let it be sent to the lake of fire!” Then Davies strode into the federal building, where he and his wife, Lanette, took on the Internal Revenue Service in a case that could set an important precedent for the nation’s rapidly growing legal marijuana industry.

At issue is a nearly $875,000 tax bill that the Davies’ have refused to pay on the grounds that a 1982 law meant to prevent drug traffickers from deducting business expenses should not apply to Canna Care, their small “Christian-based” medical marijuana dispensary in Sacramento—or any other marijuana dispensary legal under state law. Even if the Davies’ don’t win that argument, there are legal precedents for the dispensary to get a big discount on that bill if owners can prove they’re involved in two trades. So for two days of testimony, the usually staid federal tax court was given over to a detailed examination of what, exactly, constitutes a Christian cannabis business that claims to spend as much time serving the community as it does selling weed-infused lollipops.

The idea for merging marijuana and ministry came through prayer, the couple said during testimony. They had been exposed to medical marijuana when a doctor recommended Lanette Davies’ daughter use it to alleviate symptoms from a bone disease and it “made her life livable,” she said. Bryan Davies became a convert after finding it helped ease an arthritic condition that affects his spine. Trying to live on Social Security benefits and short on cash, Davies says he asked God for guidance. “I got on my knees, and I prayed to the Lord,” he told the court. “And God said … ‘Open up a pot shop.’”

Katy Steinmetz / TIME

The Davies’ set up that shop in 2005, in the back corner of a small industrial complex in a neighborhood of Sacramento called Del Paso Heights. The dispensary is marked only by an illustration of an aluminum can with the word care wrapped across the front. Inside, a security guard mans the door to a windowless lobby. A table offers pamphlets on using medical marijuana to treat chronic pain next to bibles that are given away for free. The walls are a crowded tapestry of American flags, cannabis leaves, eagles, crucifixes and the “Don’t Tread on Me” gear favored by Tea Partiers (though Lanette says she’s a staunch Democrat and Bryan calls himself a libertarian). In the back room, employees sell strains of weed like Hindu Kush, Green Candy and L.A. Confidential, starting at $3.95 per gram.

That work of selling dope, the couple said in response to questioning from IRS lawyers, is consistent with the dispensary’s broader mission to help and heal. A patron might arrive having been diagnosed with Lou Gehrig’s Disease or terminal cancer, Bryan said: “They’ve been told they have so much time to live … and they’re angry with God.” He and other Canna Care employees would often pray with those patients, they testified, in what he said was an attempt to bring them back from the “precipice.” Bryan also said during testimony that he could exorcise patients who “don’t realize they’re hosting a demon.”

Marijuana is an unlikely form of outreach to Christians. A new survey of Americans’ attitudes about marijuana released Wednesday by the Public Religion Research Institute found that the majority of the 3,390 Christians polled, 52%, said they are against legalization. Opposition is strongest among Hispanic Catholics (67%) and white evangelical Protestants (61%), while lowest among Jewish Americans (23%) and the unaffiliated (27%). Robert Jones, CEO of the firm that conducted the survey, partly attributes the opposition among Christians to their view of the body “as a temple” that shouldn’t be soiled with substances like illegal drugs or alcohol or cigarettes.

The Davies’ use the Bible to reconcile selling marijuana with their faith, believing that cannabis was among the “seed-bearing plants” the book of Genesis says God gave man on the sixth day. “You’ve got to remember who created it,” Bryan said recently, shortly after the dispensary employees finished their daily 6 p.m. prayer.

Katy Steinmetz / TIME

Prevailing in tax court will require a different standard of proof. The provision at the heart of the case is an obscure bit of federal tax code known as 280E, which states that taxpayers who are involved in drug trafficking are not allowed to deduct any business expenses—like payroll or rent or health benefits—that would be standard for other legal businesses. The law, put on the books more than a decade before any state legalized medical marijuana, has become an expensive reality for dispensaries; while medical marijuana is now legal in 20 states, and recreational marijuana is legal in two, pot is still a Schedule I controlled substance in the eyes of the federal government. And that means that regardless of state law, all dispensaries are drug traffickers as far as the IRS is concerned.

Canna Care’s disputed tax bill comes from $2.6 million in business expenses that the IRS has disallowed under that code. Getting a ruling that 280E should be revisited and no longer applied to medical marijuana dispensaries, as the Davies’ lawyer argued, would be a landmark decision for the burgeoning marijuana industry. But by the time testimony ended Feb. 25th, that appeared unlikely.

Throughout the two day hearing, the Davies’ were rebuked for using the witness stand as a soap box and rambling rather than giving forthright answers. One of their witnesses was disallowed because the IRS had not been notified of her appearance in advance, and their lawyer could not immediately recall what “THC”—or tetrahydrocannabinol, the mind-altering ingredient in cannabis—stood for. Canna Care employees testified that they did not know how their salaries were determined or by whom. Meanwhile, other attorneys arguing related cases have expressed concerns that a ruling against Canna Care might be “very detrimental” to their efforts to see the code reformed.

A ruling from judge Diana Kroupa may not be forthcoming for at least six months. As testimony ended, Kroupa seemed to acknowledge the shift in popular opinion in favor of legal marijuana, but implied that it would have little bearing on the outcome of a case that hinges, at its core, on an interpretation of fine-grained tax law. “The court is aware that there is a trend,” Kroupa said as the hearing concluded, “but the law is the law.”

Exiting the courtroom, the Davies’ remained upbeat. “I know what we’re doing is the right thing,” Lanette said, “Whether it goes for us or against us, that’s in God’s hands.”

Write to Katy Steinmetz at katy.steinmetz@time.com.