A longtime Philadelphia homicide investigator has been pulled from his regular duties after a defense attorney in a forthcoming murder trial uncovered records allegedly showing that he repeatedly deposited money into the prison account of a key witness.

According to the records, obtained by attorney Robert Gamburg and reviewed by the Inquirer and Daily News, Detective Philip Nordo made eight $50 deposits to the account of witness Rhaheem Friend between June 2015 and January 2017 — transactions that Gamburg says the detective never disclosed to prosecutors or to him.

Nordo also regularly took phone calls from Friend while he was incarcerated and waiting to testify, according to transcripts obtained by the newspapers.

Gamburg contends that the situation has compromised the case against his client Darnell Powell, who is accused of committing a murder in Kensington in 2015.

The alleged conduct "tainted the entire investigation," said Gamburg, who discovered the information last month and turned it over to the District Attorney's Office. He wants prosecutors to drop the charges against Powell.

Kathleen Martin, first assistant district attorney, declined to say whether an investigation into the allegations was ongoing, saying only that decisions on whether to drop charges are made on a case-by-case basis.

Fortunato Perri Jr., a lawyer for the Fraternal Order of Police, said Nordo was a "well-respected and dedicated member of the elite Homicide Unit, and he's never willfully engaged in conduct that would jeopardize a murder investigation." Nordo, a two-decade veteran of the Police Department, is known within the unit as an able and prolific investigator assigned to a task force often tapped for difficult cases.

Police Commissioner Richard Ross said Thursday that Nordo was on administrative duty pending results of an Internal Affairs investigation. Ross acknowledged that "if [the allegations] can be proven, that's a problem."

Ross and other experts said that the alleged conduct does not appear to be criminal, but that giving benefits to a witness without disclosing them to prosecutors or to the defense likely violates established procedures.

"Any payment to a witness, even for the most generous or charitable reasons, has to be disclosed," said Jules Epstein, a professor at Temple University Beasley School of Law. If a detective or prosecutor goes further and seeks promises from a witness in exchange for the payments, Epstein said, "that veers into the criminal."

It is unclear whether Nordo's alleged conduct might affect Powell's trial, scheduled to start Sept. 5. Powell is accused of fatally shooting Eliezer Mendez, 22, on the 2000 block of East Stella Street on May 19, 2015. Sources familiar with the case say that the evidence includes surveillance video and that at least two other witnesses may implicate Powell, including one who has pleaded guilty to participating in the crime.

Former Philadelphia District Attorney Lynne M. Abraham said Thursday that the allegations against Nordo could be "crippling" for the prosecution, potentially hampering the credibility of the witness and the detective.

If she were prosecuting a case in which such allegations arose, she said, "I would be in orbit, I'd be so mad. I'd be absolutely incensed."

"That's unacceptable," Abraham said of the alleged payments. "Beyond the pale, forbidden, never to be engaged in."

In phone conversations with Friend, which were recorded because of Friend's incarceration, Nordo occasionally chided him for asking for money, according to transcripts.

"Are you kiddin' me, man?" Nordo allegedly said during a five-minute call Sept. 24, 2016. "Do you, I mean really. When did you become a dependent of mine? Seriously, a dependent. Like a kid. Like you my child."

Ten days later, the records allege, Nordo deposited $50 in Friend's account.

Other conversations range from mundane discussions about football to arguments about Friend's incarceration. Friend, who has a long criminal record and is being held at the Curran-Fromhold Correctional Facility, regularly complained about being stuck behind bars. Nordo often told Friend it was his own fault because he allegedly was caught with drugs in a hotel room that prosecutors had rented for him.

"And that's like one of the main reasons why I'm p-d off," Nordo allegedly said during a call Sept. 25, 2016. "You were on the fast track. I was helpin' out. Instead of taking that opportunity to make it right, you got it all f-d up."

Joseph Pollini, a lecturer at John Jay College of Criminal Justice and a former lieutenant commander of the New York Police Department's cold case homicide squad, said discussions with witnesses or informants can veer into unexpected territory as detectives seek to build rapport.

"But any time you pay an informant," Pollini said, "you have to document it."

Ross said there was no specific time frame for concluding the investigation into Nordo's alleged conduct.

Gamburg, who learned of Friend's relationship with Nordo through a contact with the Defender Association of Philadelphia, said he hoped the information "results in Mr. Powell being released from custody and the case being dismissed."