Anna Gristina’s longtime accountant, accused money-launderer Jonas Gayer, cooperated against her as a confidential informant — then helped set her up for arrest outside the office of a Morgan Stanley investment banker, sources told The Post.

The Russian-born Gayer, 67, lured the accused Upper East Side madam to the Feb. 22 meeting with the promise of an investment infusion from a mystery multimillionaire.

The money was earmarked for a legitimate high-end “sugar-daddy” matchmaking service Gristina was starting, sources said.

Gayer and his big-bucks buddy were slated to sit down with Gristina and Morgan Stanley investment man David Walker to map out a business plan.

But “Gayer and the other guy never showed up,” one source said.

Instead, investigators with the Manhattan District Attorney’s Office arrested Gristina as she left the aborted meeting.

Gayer — who was arrested in March 2010 and is charged with money laundering and promoting prostitution — has been cooperating with prosecutors under the name “John Doe.”

Records show he has business ties to Gristina going back at least a decade, and sources said the two were longtime friends.

Walker was not arrested or charged. He is on administrative leave from Morgan Stanley while the case continues.

Gristina’s lawyer disputed that Gayer was used as a ruse, noting that the DA could have arrested her at her own home and didn’t need to lure her out.

“The meeting was for an absolutely legitimate reason, a matchmaking business which did not in anyway involve prostitution,” said lawyer Gary Greenwald.

“It is my understanding that Mr. Gayer was bringing in an investor because Anna had no money to invest,’’ he said. “There was no need to lure her to this location since she was generally in Monroe, home taking care of her children, one of whom is only nine.”

“It is quite obvious that, if they had allowed this meeting to proceed, it would have been apparent that Anna had no money and needed an investor to help start her legitimate business,” Greenwald said.

The lawyer also said his client is close to putting together a package to post the $2 million bond that could spring her from Rikers Island as early as next week.

“She’s anxious to get home to her family,” said co-counsel Joanna Greenwald. “She wants to get back to the structure and routine of being a loving mom to her children.”

Also yesterday, sources said a woman claiming to have worked for Gristina as an escort went to law enforcement in 2004 — after a bitter dispute with the alleged madam — and revealed that an NYPD police sergeant’s wife was working as an assitant to Gristina. The lawman and his wife were friends of Gristina’s, sources said.

After the revelation, the woman stopped working for Gristina. Her husband remained on the police force.