WASHINGTON (Reuters) - The U.S. House of Representatives voted Wednesday to advance legislation that would allow banks to provide services to cannabis companies in states where it is legal.

FILE PHOTO: A thriving marijuana plant is seen at a grow operation in Denver, Colorado December 31, 2013. REUTERS/Rick Wilking/File Photo

By a vote of 321-103, lawmakers approved the bill, which now heads to the Senate. The bill received nearly unanimous support from Democrats, as well as nearly half of all Republicans.

The measure now heads to the Senate, where it faces an uncertain fate. Senate Banking Chairman Mike Crapo has said he wants to consider similar legislation in the coming months, but it is not clear if the full Senate will vote on such a measure, analysts say.

Some Republicans are wary of giving banks the green light to engage in marijuana business while it is still federally illegal. And some Democrats have said they would rather consider broader legislation around marijuana legalization or criminal justice reform rather than a targeted banking bill.

The bill clarifies that proceeds from legitimate cannabis businesses would not be considered illegal, and directs federal regulators to write up rules for how they would supervise such banking activity.

Banks have thrown their weight behind the legislation, telling lawmakers they need clarity on whether they can do business with cannabis companies where it is legal at the state level despite the fact that marijuana remains illegal in the eyes of the federal government.

“Our members are committed to serving the financial needs of their communities – including those that have voted to legalize cannabis,” said the American Bankers Association in a letter sent to lawmakers Tuesday seeking their support.

Thirty-three states allow for some form of legal cannabis use, but banks have by and large been unwilling to do business with companies that sell marijuana or related enterprises, out of concern they could run afoul of federal laws.

In particular, banks are wary that taking deposits from pot businesses could violate federal anti-money laundering laws, which in turn could put at risk their federal charters or access to federal payments systems.

That has left companies in the marijuana industry with extremely limited options, including relying on just a handful of small financial institutions or strictly doing business in cash.