A new law signed Tuesday by Gov. Phil Murphy will allow New Jersey lottery winners to shun the spotlight.

Until now, those lucky lotto players have not had the option to claim their prizes anonymously, which history has shown can put a target on their back for moochers and scammers.

Only a handful of states permit lottery winners to keep their good fortune private, although some allow winners to put their money into trusts, allowing them some degree of anonymity.

But New Jersey will now shield the identity of winners, unless they opt for the traditional news conference, oversized check and publicity that goes with a big win.

The bill (S2267) passed the state Senate and Assembly without a single vote against it earlier this month.

Former Gov. Chris Christie vetoed legislation during his tenure that would have allowed winners to stay anonymous for a year, saying it could “undermine the transparency that provides taxpayers confidence in the integrity of the lottery and its games.”

But state Assemblyman John Burzichelli, D-Gloucester, who sponsored the bill, said publicity shouldn’t guide the state’s policy.

“If that person wants that spotlight they can elect to have it, but if a person wants their privacy they should be entitled to it," Burzichelli has said.

But anonymity — names and addresses would be exempt from the state’s open records laws — doesn’t mean complete secrecy. State agencies will be able to share the information internally to collect back child support, public assistance overpayments, delinquent or defaulted student loan payments and other debts.

The law takes effect immediately.

Samantha Marcus may be reached at smarcus@njadvancemedia.com. Follow her on Twitter @samanthamarcus.

Have a tip? Tell us. nj.com/tips

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.