Attorney General Eric H. Holder Jr. said Thursday that lawful marijuana businesses should have access to the American banking system and that the government would soon offer rules to help them gain it. The rules are not expected to give banks a green light to accept deposits and provide other services, but would tell prosecutors not to prioritize cases involving legal marijuana businesses that use banks.

“You don’t want just huge amounts of cash in these places. They want to be able to use the banking system,” Mr. Holder said at the Miller Center at the University of Virginia. “There’s a public safety component to this. Huge amounts of cash, substantial amounts of cash just kind of lying around with no place for it to be appropriately deposited, is something that would worry me, just from a law enforcement perspective.”

For marijuana growers and retailers in the 20 states that have legalized the drug for recreational or medical use, money and banking are perhaps the most vexing challenges of doing business. Piles of cash accumulate in back rooms and safes, making the businesses, their employees and their customers a target for robberies. Businesses often have no access to business loans or regular lines of credit. Many say they struggle to even keep a checking account open to pay their employees or electricity bills.

“It’s a security risk not just for the industry but all these other folks,” said Michael Elliott, the executive director of the Medical Marijuana Industry Group, who added that he was encouraged by Mr. Holder’s comments.