AUGUSTA — A new welfare law championed by Republicans and Democrats as a way to restore credibility in the state’s administration of federal benefits comes into effect this week.

The law sets penalties for people who spend cash welfare benefits on alcohol, tobacco, lottery tickets, bail, firearms, vacations, adult entertainment and tattoos. A state working group will study how to block electronic benefits cards from being used to buy prohibited items and how much such a system would cost.

Maine joins Kansas, New York and Massachusetts and other states that also have restricted the use of public assistance funds since the recession.

The progressive group Maine People’s Alliance said such “scapegoating” of poor people won’t accomplish anything.

“This is not going to help anyone get out of poverty,” said Alliance spokesman Mike Tipping, who added that children will suffer most from the penalties and that it might cost the state more to tweak electronic benefits transfer, or EBT, cards, than the law would save. The cards can be used to withdraw cash as well as make purchases directly.

The law’s fiscal note says any savings will stay in the block grant that Maine receives to administer the federal Temporary Assistance for Needy Families program.

Democratic sponsor Sen. Nate Libby of Lewiston, acknowledged there’s no way to police cash benefits. He said the best solution is removing some cash benefits from the welfare system.

Republican Gov. Paul LePage’s spokesman Peter Steele said the governor first proposed such reform in 2014. Democrats had called his measure unenforceable and instead passed a law prohibiting EBT transactions at smoke shops.

This year, Republicans and Democrats disagreed how strong penalties should be. The compromise law’s penalties range from up to three months of suspended benefits on the first offense to up to two years of suspended benefits on third and subsequent offenses.

Other laws coming into effect Friday include those related to:

n A study of the fiscal costs of establishing a presidential primary system in Maine.

n A fund supporting business development projects that have estimated costs of at least $50 million or that create or retain at least 250 full-time jobs.

n A new program providing interest-free loans to Maine students who receive science, technology, engineering or math degrees and pursue such careers in the state.

n A new program to help senior citizens and poor people access heat pumps.

There also are several laws concerning the opioid crisis, including a strict opioid prescribing law and another authorizing pharmacists to dispense naloxone, a drug used to combat opioid overdoses, without a prescription.