While facing bribery charges in federal court in Manhattan a Long Island private eye has thrown an unexpected monkey wrench into efforts by his prosecutor, the office of U.S. Attorney Preet Bharara, to win freedom for a convicted cop-killer in an unrelated case.

Shoreham private detective Joseph Dwyer, 48, the ex-cop at the center of the unusual scenario, was accused in late 2014 of paying off an NYPD sergeant for confidential information on witnesses while working as an investigator for court-appointed defense lawyers. He pleaded guilty in January and is awaiting sentencing later this week.

But in the meantime, in an odd twist, Dwyer turned over to the Bronx district attorney evidence that Bharara’s office had held back on a federal informant who is a linchpin of efforts to exonerate Edward Garry, imprisoned for the 1995 killing of retired NYPD officer Oswald Potter.

Bronx prosecutors said the evidence — a taped interview Dwyer conducted as a private investigator that raises questions about informant Lawrence Broussard’s credibility — strengthened their hand in fighting Garry’s release, and have promised Dwyer a letter to use to seek leniency at his upcoming sentencing.

“He actually let the U.S. attorney’s office know about the tape way before he told me about it,” Bronx prosecutor Gary Weil said at a hearing last year, according to a transcript. “…They never informed me that they received it, and I had to rely on [Dwyer], through his attorney, my getting that recording.”

Dwyer and his lawyer have declined to comment on the case, as has Bharara’s office, and Dwyer’s sentencing memo in Manhattan federal court, due last Friday, was not filed publicly, so it is unclear to what degree the Garry case will even come up when he is sentenced.

advertisement | advertise on newsday

If it does, however, legal experts caution that while many defendants try to do good things while facing charges to win leniency at sentencing, Dwyer’s efforts to help the DA may have only limited value in his federal case.

“The federal prosecutor is prosecuting you,” said Bennett Gershman, an expert on prosecutorial ethics who teaches criminal law at Pace University law school. “That’s the cooperation that matters.”

The complicated scenario had its origin in the murder of Potter, who was shot during the robbery of a gambling parlor at a Bronx bodega. Garry, the only culprit arrested, was convicted and sentenced to 25 years to life despite claiming he was a victim of mistaken identity.

Broussard, a felon with a long rap sheet, began cooperating with federal prosecutors in Manhattan after an arrest led to federal firearms charges in 2004. He admitted participating in the Potter robbery and provided information on other crimes including gang cases — valuable enough to win his release after only 77 months in prison.

According to court papers, Broussard identified two accomplices in the Potter case, neither of them Garry, and said a fourth man was the shooter, an individual he barely knew nicknamed “Flip” — but failed to ID Garry when shown photos. Later investigation revealed police originally had a different suspect named Stephen Martinez, and Broussard said he thought Martinez’ picture was “Flip,” with a certainty ranging from 65 percent to 100 percent at various times.

Bharara’s office cooperated with lawyers for Garry from a nonprofit called the Exoneration Initiative, and Broussard and an investigator for the U.S. Attorney both testified in support of Garry at a hearing in the Bronx on Sept. 5, 2014, that was featured in a New York Times story.

But it is now undisputed that in 2012, Dwyer, working at the time as an investigator for the Exoneration Initiative, had tracked Broussard down in Georgia, and in a recorded interview Broussard said multiple times that Garry in fact was “Flip” — the shooter.

“The guy that I’m working for?” a stunned Dwyer said at one point, according to a transcript.

“Yeah,” Broussard answered. “…I don’t know what type of games he’s playing with y’all.”

According to his later court testimony, Dwyer reported the contradictory statements to Garry’s lawyers, and Broussard later testified he was asked about the Dwyer statements at a meeting in early 2014 with a prosecutor from Bharara’s office as well as Garry’s lawyers and others. But the statements were never mentioned when Broussard first testified in September.

advertisement | advertise on newsday

Dwyer was charged by federal prosecutors a month later in the unrelated federal bribery case. And a recording of the interview with Broussard was given to Bharara’s office by Dwyer’s lawyer in November, according to Weil.

But it wasn’t until five months later, in April of last year, that prosecutors in the Bronx learned of the interview and the recording — not from the Exoneration Initiative or Bharara’s office, but from Dwyer’s lawyer — and called Dwyer to the stand as a surprise witness.

The omission, Weil complained to presiding Bronx Justice Richard Price, had hamstrung his cross-examination of Garry’s key witness. “He lied,” Weil said. “One way or the other, Mr. Brussard lied, either in court here to your Honor or on that interview to Mr. Dwyer, but he lied, and I was never given the chance to question him about it.”

In the year since disclosure of the tape, action on Garry’s case has stalled.

Broussard, recalled to the stand, said he hadn’t trusted Dwyer when he talked to him and had used the name Garry for “Flip” because it was the only name he had heard from his federal handlers in 2012, not because he actually knew him. On the stand, looking at Garry, he repeated that he wasn’t “Flip.”

advertisement | advertise on newsday

Bronx prosecutors and the Exoneration Initiative fought over whether either had behaved unethically, but Price denied sanctions. Then, late in 2015, Price was removed for medical reasons and the case was reassigned to a new judge, who has heard yet again from Broussard and other witnesses.

In contrast to the DA, Exoneration Initiative lawyer Glenn Garber is critical of Dwyer. Garber has argued that he believed Broussard was just trying to brush off Dwyer when they spoke, the recordings got lost in Garber’s email sytem, and it was so insignificant that Garber had forgotten there was a recording by the time Broussard testified.

He disputes some of Dwyer’s testimony and complains that the investigator violated confidences by taking the work he did for Garry to prosecutors. “It was a desperate effort to get some kind of consideration in his sentencing,” Garber said. “…He did the wrong thing. He’s our agent and for him to do what he did was a huge violation of trust to us and our client.”

Garber also believes the recording ultimately won’t distract from a strong exoneration claim. In addition to Broussard, he says, the other accomplices failed to identify Garry, and another accomplice failed to pick Garry’s picture out of a photo array, and Broussard has testified that running from the bodega “Flip” was shot in his right hand — where Martinez has a scar, and Garry does not.

The only effect of Dwyer’s testimony, he argues, has been to delay the release of a man already wrongfully imprisoned for 20 years. “There was months of litigation,” he said. “It has certainly delayed things.”

The Bronx DA’s office had no comment, and a spokesman for Bharara’s office repeatedly declined to comment on why it held back the recording from the DA, and whether it would have eventually acted.

Garber said Bharara’s office gave him a heads up that it had gotten the recording, and no participants in the case have publicly criticized the U.S. Attorney’s handling of it. Legal experts were divided over whether federal prosecutors were required to alert the DA, or the judge.

Even if they were concerned that it was confidential defense material, Gershman said, Bharara’s office should have taken action. “They have a duty to inform the court of information that might undermine the integrity of the process,” he said. “It doesn’t matter if you believe it, because the judge has to be the ultimate fact-finder.”

But Steven Gillers, a legal ethics expert at NYU Law School, said that while federal prosecutors could have done more, they were not parties in the case and had no professional obligation. “Under the ethics code for lawyers the U.S. attorney’s office did not have a duty to provide the tape to the DA or the court,” he said.

Dwyer, a veteran defense investigator who allegedly made $500,000 on court-appointed cases from 2011 to 2013, pleaded guilty in January in his federal case to a single count of conspiracy with a maximum of five years in prison. Federal guidelines call for a range of 10 to 16 months in prison, but probation officials have called for no jail time, according to a defense letter.

The final say, and the effect of Dwyer’s cameo appearance in the Bronx, will come from U.S. District Judge Alison Nathan when she sentences him on Friday. The sentencing memo from Bharara’s office is due Tuesday, and the judge has ordered Dwyer’s lawyer to publicly file his memo by Tuesday as well.

Dwyer’s lawyer, Guy Oksenhendler, said in a statement that his client had “crossed the line” in paying for information in the federal case, but did it because he was a “zealous” investigator trying to help his indigent clients. “His heart was always in the right place,” he said.

And David Schoen, an Alabama defense lawyer who worked with Dwyer on New York cases and wrote the judge on his behalf, said that far from violating defense confidentiality duties, Dwyer was doing what he was supposed to do by coming forward in the Garry case.

“Joe felt unequivocally he was compelled to do so,” Schoen said, “in the interests of justice. ”