The so-called "no welfare for weed bill," which would block pot shops from accepting welfare debit cards, passed the House of Representatives Tuesday.

The Preserving Welfare for Needs Not Weed Act aims to close the loophole that was created when states such as Washington and Colorado legalized the recreational sale of marijuana, Rep. David Reichert, the bill's main sponsor, said on the House floor, according to a video of his remarks posted on his YouTube page.

A federal law passed in 2012 forces states to prevent welfare recipients who benefit from the Temporary Assistance for Needy Families program from using their assistance at casinos, liquor stores and strip clubs, but it does not cover pot shops, the Republican from Washington, said.

Tonight the House passed my legislation to protect your tax $ and close the pot shop loophole: http://t.co/jjx5HhSjBh — Dave Reichert (@davereichert) September 17, 2014

"These are federal tax dollars meant for basic necessities and instead they are being used to purchase something that is illegal under federal law," Reichert said. "It is exactly this misuse of tax dollars that this bill is designed to stop."

The House passed the bill, which would also prevent welfare debit card users from getting money from ATMs in pot shops, on a voice vote. The bill, however, does not prevent one from using the electronic benefit transfer cards at another ATM and then spending the cash at a store that sells marijuana.

About 3.6 million families receive cash benefits under the needy families program, according to the Health and Human Services Department. That includes about 45,000 in Colorado and roughly 99,000 in Washington State.

More than $5,000 in welfare benefits "were accessed in stores selling marijuana in the first month such stores were open" in Colorado, Reichert said.

Sen. Jeff Sessions, R-Ala., raised the issue of using the cards to buy marijuana in April, when he sent a letter to the human services department asking whether it could prevent transactions at stores that sell marijuana.

The department's secretary, Sylvia Mathews Burwell, responded in July that it has no authority to prevent the use of benefit cards at stores that sell marijuana.

A similar Senate bill must be approved and the president must sign the legislation for the "no welfare for weed bill" to become law.

Sessions has promised to introduce a similar Senate bill, but with Congress rushing to go home as early as this week to campaign for congressional elections in November, the bill is unlikely to reach President Barack Obama's desk this year.

Additional reporting by The Associated Press