When medical marijuana becomes available in Minnesota on July 1, two state-approved companies will begin selling cannabis in pill and oil form to patients who suffer from cancer, HIV, AIDS, ALS and other conditions.

But although state lawmakers made dispensing the drug to those patients legal, federal law still bans marijuana. That's led to some big financial challenges for Minnesota's fledgling cannabis industry.

One of the biggest tests for the two manufacturers picked by the state to produce medical cannabis is setting up banking services.

Since winning approval from the Minnesota Department of Health to operate, Dr. Kyle Kingsley, an emergency room physician and the co-founder of Minnesota Medical Solutions, has hired several dozen people. His company also has built a highly secure greenhouse in Otsego, Minn., and opened a massive marijuana growing and processing plant.

But when Kingsley tried to open the accounts the company would need, the bankers he first approached were skittish.

"We were turned down by some banks, initially," he said.

Finding a bank was an early obstacle for Kingsley in navigating the gray zone of marijuana laws. Pot is legal in 23 states, largely for medicinal purposes. But as far as the federal Drug Enforcement Administration is concerned, it's in league with LSD and heroin — and has "no currently accepted medical use."

Because marijuana is on the federal list of controlled substances, bankers fear a federal crackdown for helping businesses that could easily fit the definition of drug traffickers. But after doing some research, Kingsley found that the Obama administration has made some accommodations.

A 2013 memo from former Deputy U.S. Attorney General James Cole indicates busting state-regulated pot businesses would not be a federal priority. And last year, the U.S. Department of Treasury offered guidelines to banks for working with state-licensed marijuana companies.

Armed with documents indicating federal enforcement would not be aggressive, Kingsley said he later found three banks — a national bank and two based in Minnesota — that would allow him to open deposit accounts and lines of credit.

"They're very reassured by a system like Minnesota's that's highly regulated," he said. "And also [by] a group like ours. We're not money launderers. We're physicians. We're scientists. We're business people."

Kingsley declines to name the banks for fear of jeopardizing the relationships. For every deposit Minnesota Medical Solutions makes, he said, the banks will have to file a suspicious activity report with federal regulators. There likely will be many cash deposits.

"It's a greenback operation right now," he said. "We're looking at the possibility of some check solutions. But at this point it's looking like all cash."

That's because credit card companies also are leery of handling pot transactions. But Kingsley hopes to win them over too.

Dr. Andrew Bachman — the founder of Leafline Labs, Minnesota's other cannabis distributor — declined to be interviewed about his company's financial arrangements. But he said in a statement that Leafline is "well-capitalized" and is "working with multiple financial institutions."

Marijuana operations licensed in Minnesota apparently have had better luck than those in other states.

"The vast majority of businesses in the industry right now are not able to access bank accounts," said Taylor West, deputy director of the Denver-based National Cannabis Industry Association.

In Colorado, where recreational pot is legal, many sellers handle all their transactions — including paying employees — in cash. Just as problematic, West said, are federal taxes. Thanks to a 1970s Minneapolis drug dealer who deducted some of his business expenses, Congress imposed a ban on such deductions. West said that means legitimate cannabis firms pay taxes on all their revenue, not just net income.

"Businesses are paying tax rates that effectively can reach 75 or 80 percent of their profit," West said.

Aaron Hall, a Minneapolis attorney who advises a medical marijuana company, said the fact that many states have legalized cannabis shows that attitudes are changing. But unless laws at all levels keep up, Hall said, even state-sanctioned cannabis firms and the businesses that serve them will remain in some potential legal jeopardy.

"We need to allow them to use the banks, the attorneys, the doctors and the entire societal infrastructure to have a law abiding business," he said.

Hall said he feared simply helping a marijuana company would jeopardize his law license. But after petitioning the state panel that oversees attorneys, he received approval to proceed.

The practice area could grow, he said, as drug laws evolve, a new president takes office, and more business owners need help navigating an uncertain legal and financial environment.