STATEN ISLAND, N.Y. -- A Brooklyn prosecutor from Staten Island is being investigated for having an alleged affair with a former detective accused of raping a teenager last year, authorities said.

Assistant District Attorney Nicole Manini, 34, who lives in Rosebank, is being probed for professional misconduct after she was caught having an inappropriate relationship with ex-cop Richard Hall, according to the New York Post.

Hall, 33, and former detective Eddie Martins, 37, are charged in a 50-count indictment for raping the teen in an NYPD van on Sept. 15, 2017, after she was arrested for alleged illegal possession of prescription pills.

"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 defendant Martins socially," said a spokeswoman for the Brooklyn DA's office in a statement to the Advance.

"This ADA had no involvement in or access to the investigation or prosecution,'' added the spokeswoman. "Out of an abundance of caution, we have disclosed this information to all relevant parties.''

Investigators said Martins and Hall repeatedly sexually assaulted the teen before releasing her. She went to the hospital, where prosecutors say DNA was obtained that matched both men.

Both men pleaded not guilty to the charges.

The Post reported that the affair between Manini and Hall was discovered during the investigation into the rape case.

Phone calls between the prosecutor and cop, who is married and has two children, began before the alleged rape, sources told the Post.

-- Associated Press materials were used in this report.