Updated

A Brooklyn prosecutor was caught having an affair with one of the NYPD cops accused of raping a handcuffed teenager, The Post has learned.

Assistant District Attorney Nicole Manini, 34, is under investigation for potentially violating professional conduct rules for New York lawyers, according to sources familiar with the matter.

Manini’s illicit relationship with now-former Detective Richard Hall, 33, was uncovered when investigators with her office reviewed his cellphone records as part of the rape case, sources said.

The phone logs revealed multiple calls between Manini and Hall, who is married with two kids, sources said.

The calls began before the alleged Sept. 15 rape and continued afterward, sources said.

The DA’s office referred Manini for investigation to the court system’s Grievance Committee for the Second, Eleventh and Thirteenth Judicial Districts, which prosecutes cases of professional misconduct by lawyers.

“During our investigation of this case, we learned that a junior assistant district attorney in our office was engaged in an intimate relationship with defendant Hall and knew [second] defendant [Eddie] Martins socially,’’ a spokesman for the DA’s office told The Post Monday.

“This ADA had no involvement in or access to the investigation or prosecution,’’ the rep said. “Out of an abundance of caution, we have disclosed this information to all relevant parties.

”Michael David, the lawyer representing Hall’s rape accuser, said he plans to use the former cop’s affair with Manini in his client’s pending civil rights suit against Hall, Martins and the city.

CLICK FOR MORE FROM THE NEW YORK POST