LOS ANGELES — One of the two Los Angeles police detectives investigating gang-rape allegations against former Bulls star Derrick Rose and two of his friends was found dead Tuesday, officials said.

Nadine Hernandez, 44, a detective in the LAPD’s Robbery-Homicide Division Special Assault Section, died of an apparent self-inflicted gunshot wound, the Los Angeles Times reported Wednesday.

Police from suburban-Los Angeles Whittier received a call of an attempted suicide at 2:45 p.m. Tuesday. A gun was recovered at the scene.

Hernandez was taken to a hospital and died at 3:27 p.m.

Last month, a story posted by the website ThinkProgress revealed that Hernandez had sent a letter to Rose’s accuser’s attorney, Brandan Anand, stating that the LAPD had an open criminal allegation of the rape allegations the woman had made.

The LAPD said there’s no indication that Hernandez’s death was related to any cases she was investigating.

The detective had not been expected to testify at the civil trial, Anand said.

Rose, the former Simeon High School star who now plays for the New York Knicks, has been involved in a high-profile civil suit accusing him and two of his friends of gang-raping the woman. News of the LAPD’s criminal investigation of Rose has surfaced during the civil trial.

A federal judge refused to declare a mistrial in the case Wednesday morning despite controversy over the disclosure of text messages the woman had sent to Rose around the time of the alleged assault, the Los Angeles Times reported.

Lawyers for Rose had argued that the plaintiff’s lawyers purposely withheld three texts until the woman finished testifying so the defense couldn’t ask about messages that showed she had been plotting sex on the night in question and, on the following day, was seeking taxi reimbursement and not accusing anyone of rape.

The woman’s lawyers said the texts did not add new information. They claimed they were shared with the defense, though they couldn’t prove it.

U.S. District Court Judge Michael W. Fitzgerald said the accuser’s legal team had failed its legal obligation to share the texts, but there was a “minimal amount of prejudice” against Rose and his friends.

The woman suing Rose and two friends for $21.5 million claims she was raped while incapacitated three years ago.

Text messages have played a central role in the case, providing a rough chronology and also helping explain what happened at a time when she said she blacked out from drinking and possibly some drug. During that time, she continued sending coherent messages to Rose.

Dr. Ernest Lykissa, a toxicologist hired by the defense, testified that the woman couldn’t have been as drunk as she claimed and been able to text so clearly.

Defense lawyer Mark Baute said the newly revealed text messages were the best evidence the defense had that the woman had filed a false rape claim after being “dumped by texts” from Rose.

During his argument to have the case dismissed, Baute also said Detective Hernandez had once told him “there’s no rape case here.”

The woman suing Rose appeared shocked by news of the death.

Hernandez had just interviewed the woman at her parents’ Northern California home in the past month, Anand said.

“She unequivocally stated that a crime had been committed,” Anand said.

A Los Angeles police spokeswoman wouldn’t comment on the death or the investigation, but the department issued a statement saying Hernandez was one of several detectives investigating the allegations and her death wouldn’t impede the probe.