Joint memos from the Department of the Justice and the Treasury Department’s Financial Crimes Enforcement Network gave individual banks the discretion to transact with legal marijuana companies, which have been denied access to basic services like checking accounts and credit cards because of federal money-laundering statutes.

The documents outline the steps financial institutions must take if they wish to transact with legal cannabis companies, while reaffirming their obligations to report illicit activity. Taken together, they offer a long-sought roadmap for both the banking and marijuana industries, which have been trying to resolve the problems created by forcing pot shops to hoard huge sums of cash.

The lack of access to basic banking has been the biggest early obstacle for the marijuana industry since Colorado and Washington state legalized marijuana for recreational uses. Managing stockpiles of cash is a complex task that makes it harder for the state to track and tax legal marijuana purchases, and presents serious safety hazards for employees of legal businesses.

The guidance “clarifies how financial institutions can provide services to marijuana-related businesses,” the Treasury Department wrote. “In general, the decision to open, close or refuse any particular account or relationship should be made by each financial institution.”

Justice Department spokeswoman Allison Price told TIME that the department “shares the concerns of public officials and law enforcement about the public safety risks associated with businesses that handle significant amounts of cash. These guidelines, together with the Treasury Department’s guidance to financial institutions, are intended to increase the availability of financial services for marijuana businesses—that are licensed and regulated—while at the same time preserving and enhancing important law enforcement tools.”

Cannabis groups hailed the documents as a major milestone for the industry. “This is a huge victory for our members, our communities, and the banks that take this opportunity to serve a thriving new market,” said Aaron Smith, executive director of the National Cannabis Industry Association.

Despite the government’s attempt to help the market operate, it is not clear that the memos are a long-term solution to the cash dilemma. The banking lobby has said repeatedly that financial institutions will require greater certainty than the yellow light the government gave Friday to transact freely with cannabis companies. Robert Rowe, a lawyer for the American Bankers Association, told TIME last month that “it would take an act of Congress” for banks to assume the risk. “Put simply: banks need the permanence of law versus changeable guidance,” Colorado Bankers Association CEO Don Childears wrote in an op-ed in the Denver Postlast week.

The banking industry reacted cautiously on Friday.

“While we appreciate the efforts by the Department of Justice and FinCEN, guidance or regulation doesn’t alter the underlying challenge for banks,” Frank Keating, CEO of the American Bankers Association, said in a statement. “As it stands, possession or distribution of marijuana violates federal law, and banks that provide support for those activities face the risk of prosecution and assorted sanctions.”

The memos make clear that prosecutors retain the right to pursue banks who fail to uphold federal law. They are “intended solely as a guide to the exercise of investigative and prosecutorial discretion,” wrote Deputy Attorney General James Cole, and do “not alter in any way the Department’s authority to enforce federal law, including federal laws relating to marijuana, regardless of state law.”

The guidance had been anticipated. Attorney General Eric Holder said during a visit to the University of Virginia last month that the department recognized the hazards inherent in forcing cannabis companies to skulk around carrying fat stacks of cash. “It’s an attempt to deal with reality that exists in these states,” Holder said on Jan. 23. “There’s a public safety component to this. Huge amounts of cash, substantial amounts of the cash, just kind of lying around with no place for it to appropriately deposited is something that would worry me from just a law enforcement perspective.”

A bipartisan coalition of lawmakers has crafted legislation designed to ease banking access for pot companies operating in the 21 states, plus the District of Columbia, where either medical or recreational marijuana use is permitted. “We need to address the public safety, crime and lost tax revenue associated when legal and regulated businesses are operating in a cash-only system,” Colorado Rep. Ed Perlmutter, a Democrat, wrote recently. Perlmutter has a bill pending that would give full legal clearance for pot shops to receive banking services. But that measure is likely to languish in a divided Congress.

Until a similar measure passes, the banking issue will remain a looming threat to the growing marijuana industry, which is projected by the market research firm ArcView to add $2.5 billion to the U.S. economy in 2014.

“While we believe today’s guidance should provide banks some of the assurances they need to begin doing business with the marijuana industry, it doesn’t solve all the problems,” said Mike Elliott, executive director of the Medical Marijuana Industry Group. “It is imperative that Congress not view today’s guidance as the ultimate solution to this public safety crisis. Congress must act quickly to solve the problem before we witness a tragedy.”