A former Brooklyn prosecutor is set to go on trial Monday in a guns-for-bribes case that has shaken up the way the NYPD doles out gun permits.

John Chambers, a self-described gun lawyer to the stars, stands accused of bribing David Villanueva, an ex-supervisor in the NYPD’s gun licensing division, for hard-to-obtain gun permits — including for a client who was being investigated for domestic abuse, according to prosecutors.

Chambers is one of seven people who have been charged by Manhattan federal prosecutors for paying or accepting bribes for permits, including Villanueva, three other cops and two other gun expediters. His arrest last year, along with the officers, resulted in the NYPD announcing major changes to its gun licensing division, including staffing changes.

Chambers, 63, is the first to take his case to trial.

The government’s key witness, Villanueva, who is cooperating with the feds, will tell the jury that Chambers gave him tickets to Broadway shows and baseball games, an $8,000 Paul Picot watch and cash hidden in magazines.

In exchange, Villanueva will say he helped Chambers get gun licenses with the NYPD and with the Nassau County Police Department.

Prosecutors are also expected to introduce email evidence showing that Chambers bribed Villanueva to help a client who was afraid of losing his gun license because he was under investigation for a domestic incident.

Chambers allegedly told the client he sent a photo of a watch to Villanueva in exchange for help with the client’s gun permit.

“The watch is beautiful and very classy…will work wonders to repair the damage done, as well as get us on the track we need to be on for you,” Chambers said in an email, according to court papers.

Defense lawyers are expected to screen potential jurors on Monday for a bias against guns.

Chambers, who is transgender, has also asked the judge to instruct the jurors that they cannot base their verdict on “gender identity,” although it is not expected to come up at trial.

“I was just concerned, if it were to come out during the trial,” defense lawyer Steve Brounstein told the judge last week. “There are still people who will react in a prejudiced manner.”