A New York City police official apologized Friday to a rape victim he helped discredit almost 24 years ago.

Deputy Commissioner John Miller said in a statement sent to the woman's lawyer that he was wrong to tell reporters that police doubted the woman's account of being raped in Brooklyn's Prospect Park.

Police said this week that they had finally solved the crime by matching DNA found on the victim to a serial rapist who is in prison for other attacks.

Miller, then the chief police spokesman, told reporters in 1994 that detectives believed there were inconsistencies in the woman's story.

Miller said in his apology that "Inappropriately sharing this information, which was the speculation of investigators, and ultimately proved to be incorrect, was a serious misjudgment on my part." He added, "It re-victimized a person who was already the victim of a terrible crime. I sincerely apologize to her for that."

The woman's attorney, Martin Garbus, said Miller's apology was not enough.

"Miller and the police did not make a bookkeeping mistake," Garbus said in an email to The Associated Press. "The police because of racism and sexism abused Jane Doe and called an honest woman a liar and hoaxer."

The woman, now 51 years old, is African-American. The Associated Press does not generally identify victims of sexual assault.

Miller, now the deputy commissioner for counterterrorism and intelligence, was a source for Daily News columnist Mike McAlary, who wrote that police believed the attack was a "hoax."

McAlary wrote at the time that police sources had told him that the woman invented her story because she wanted to bolster a speech she was to give at a rally about violence against lesbians.

"The woman, who will probably end up being arrested herself, invented the crime, they said, to promote her rally," McAlary wrote in a column called "Rape hoax the real crime."

The woman sued McAlary for libel but a judge dismissed the case in part because McAlary had been relying on information from police. McAlary died in 1998.

The woman was raped in Prospect Park while walking home with groceries on April 26, 1994. Police released a sketch based on her description of the attacker, but no arrests were made.

The Police Department announced Tuesday that modern DNA analysis methods had led to a match with serial rapist Edward Webb, who is serving 75 years to life in prison.

Webb had been charged with 10 other rapes over several decades. He told police he denied raping the woman in the 1994 case.

The woman said in a statement released by her Garbus, that she was grateful that Webb was finally brought to justice.

She said being called a liar by police sources "had a silencing effect on me, to say the least. I paid a terrible, terrible price for my #MeToo."

She added that "stories of assault are still discounted; cases are not vigorously prosecuted. Schools and workplaces deal with sexual assaults as internal disciplinary matters instead of as what they are — crimes."

In the statement, which came hours before Miller's apology, she called for apologies from him and from the NYPD and the Daily News.

The statements by Miller and the woman were first reported in the New York Post.