BOSTON — More than two dozen welfare recipients have tried to use their state-issued electronic benefit cards to buy legal marijuana, according to newly released data.

Welfare recipients cannot buy legal marijuana products with their EBT cards, but the state Department of Transitional Assistance, which oversees the program, has "blocked" more than 100 ATMs and other point-of-sale terminals in or near 20 recreational pot shops since November from being used to take out cash.

That has prevented 28 attempted purchases, totaling $1,825, according to the agency.

"The Department of Transitional Assistance’s responsibility is to ensure that all benefits are used appropriately," the agency said in a statement. "Recreational marijuana establishments are prohibited by law from accepting electronic benefit transfer cards."

Electronic benefit transfer cards work like debit cards, allowing recipients to withdraw cash at ATMs. Besides pot, welfare recipients can’t buy alcohol, tobacco or other prohibited items with their cards, but they can still take out cash from an ATM to buy whatever they want.

Massachusetts is one of 11 states that have legalized recreational marijuana's use and sale. It is one of 33 states and the District of Columbia that allow pot for medical purposes.

The 2016 voter-approved pot law allows adults age 21 and over to possess up to 10 ounces of weed, and it authorizes regulated cultivation and retail sales.

Because most medical and recreational pot shops are a cash-only businesses, they have on-site ATMs allowing customers to make withdrawals.

State officials didn't disclose locations of the attempted transactions — or whether there were any successful transactions — but the agency's statement pointed out that it "has worked closely with the Cannabis Control Commission and licensed retailers to prevent prohibited transactions from occurring."

Once a pot shop gets approval from state regulators to open, the Department of Transitional Assistance sends a letter to the owners detailing the laws on prohibited purchases and penalties for violations. State inspectors visit the shops to document ATMs, cash registers and other point-of-sale devices and monitor transactions to determine if anyone with an EBT card is trying to buy pot.

Signs are posted above ATMs in many of the pot shops advising patrons that they won't be able to make withdrawals using their EBT cards.

Drop in spending

Overall, prohibited spending of welfare benefits at bars, liquor stores and other banned locations has plummeted from $258,080 in 2013 to $16,136 in 2016, according to the agency, which attributes the decline to better technology and stepped up enforcement efforts that have blocked EBT cards from being used at 3,700 locations.

A report two years ago found the largest portion of blocked machines — about 46 percent — are in liquor stores. More than a third are in bars, nightclubs and taverns.

Gambling establishments and tobacco shops each represent about 5 percent. Manicure or aesthetic shops represent fewer than 2 percent.

To be sure, the number of families on the state’s primary cash assistance program has declined by half since the 1990s, to about 30,000 per month, according to the agency. The state spends about $16 million a month on the programs.

Under the state's current law, a recipient is limited to receiving welfare for two years in any five-year period. The average family in the program collects roughly $449 per month.

Five years ago, lawmakers set harsher penalties for store owners who knowingly allow recipients to buy lottery tickets, tobacco and other prohibited items with their benefits cards.

The law, signed by Gov. Deval Patrick, added televisions, stereos and video games to a list of items forbidden from being purchased with the benefits.

Also, as part of the reforms, an "able-bodied" recipient must work 30 hours a week to continue receiving the benefits.

The changes were driven, in part, by a scathing 2013 report by the state auditor revealing millions of dollars in "questionable benefits," in some cases paid to dead people.

Lawmakers added marijuana to the list of prohibited EBT card purchases as part of an overhaul of the voter-approved recreational pot law in 2017, which Gov. Charlie Baker signed.

Advocates for the benefits programs say the money the state is using to block withdrawals would be better spent expanding EBT programs for the neediest of families.

"We'd like to see the money going to help families get what they need rather than trying to micromanage their daily activities," said Naomi Meyer, a senior attorney at Greater Boston Legal Services. "Low-income people aren't using cash assistance to buy prohibited items, they're trying to stretch every dollar to meet their family's basic needs."

Christian M. Wade covers the Massachusetts Statehouse for The Salem News and its sister newspapers and websites. Email him at cwade@cnhi.com.