First she was raped by a stranger in Prospect Park in 1994.

Then she was violated again — this time by the cops who questioned her credibility and a Daily News columnist who called the attack a “hoax.”

But now, after more than 23 years, she’s finally getting justice.

After running new DNA tests, police have identified the man who attacked the then-27-year-old Yale graduate in Prospect Park, linking the heinous crime to James Edward Webb, 68, a serial rapist who is serving 75 years to life at Sing Sing, sources told The Post Tuesday.

“As soon as we knocked on her door and we told her we were NYPD detectives, she nearly broke down and cried,” Chief of Detectives Robert Boyce said.

“She cried last night when we told her we had the guy. I think my detectives cried with her.”

Police had recovered semen from the victim’s body and shorts after the crime — but the suspect’s DNA was mixed up with the victim’s genetic material, so they couldn’t create separate profiles at the time.

About two months ago, the NYPD’s Cold Case Squad took another look at the rape kit and successfully separated the two DNA profiles, thanks to new technology.

That’s when they found a match in a federal DNA database.

“He’s a savage,” Boyce said of Webb, whom cops recently confronted in Sing Sing. “He told us, ‘I don’t know what you’re talking about.’ ”

The discovery brings an end to a high-profile rape case that generated controversy and even spawned a $12 million libel suit.

On April 26, 1994, the victim told cops she was raped in broad daylight while walking through Prospect Park with groceries she had picked up after a jog.

The woman was on her way home when her attacker, who was carrying a large stick or cane, dragged her from a footpath to a nearby tree, raped her, then demanded money, she told police.

John Miller, then an NYPD spokesperson, told reporters at the time that detectives had some doubts about her account — saying there was a lack of physical evidence and there appeared to be inconsistencies in her story, according to deposition testimony obtained by the New York Times.

Citing anonymous police sources, the late Daily News columnist Mike McAlary then penned a piece headlined “Rape Hoax the Real Crime,” saying the woman would be arrested because “everyone who heard the woman’s story about the alleged rape was calling it a hoax.”

He claimed police thought she had dreamed up the rape to drum up support for an upcoming rally sponsored by the Gay and Lesbian Anti-Violence Project.

McAlary also questioned why the victim didn’t have bruises or injuries, sarcastically writing, “Chivalry at a rape scene.”

His initial column — one of three McAlary wrote questioning the case — said police hadn’t found semen on the victim, but an NYPD lab report released the next day revealed semen was present on the woman’s body and her shorts.

In a May 1994 column, McAlary still stood by his story, quoting one police source as saying, “Stand your ground. The lab is wrong.”

Former NYPD Police Commissioner Bill Bratton issued an apology after the columnist’s first piece appeared.

“I can comfortably offer an apology that in terms of any police role in this, it should not have been,” he said at a promotion ceremony on April 29, 1994.

The victim told The Post at the time that she was stunned by the backlash and “burned the column.”

“I have had the misfortune of being raped twice — once in the park and again in the media,” the woman said soon after the attack.

She ultimately sued the newspaper and McAlary for libel, but the case was dismissed by a Manhattan judge, who determined the columnist had written an accurate account of what he was hearing from his police sources.

The late John Timoney, who was chief of department in 1994, also was suspected of leaking information to McAlary­, according to NYPD Deputy Chief Timothy Trainor, a police spokesman, referencing a past news column.

In 1994, Miller — a former reporter who is currently the NYPD deputy commissioner for counterterrorism and intelligence — dismissed his role in the press coverage of the rape case.

“Reporters seize on what they think is titillating or important or sensational, and they run with it, even though they seize on it from a context of many other things that become left out,” he told Newsday in an October 1994 interview.

“And when they’re done running with it, they come running back at either the Police Department or the Mayor’s Office, or whatever agency has the case, and they hold those people accountable for their skin on the story.”

The victim’s lawyer said Tuesday that his client wants an apology from the Daily News and the NYPD.

“We have asked the Daily News and the Police Department for an apology and we have not heard back yet,” attorney Martin Garbus said.

“Miller is still with the police force. He’s the guy who gave the false information and he’s still with the police force and he’s never offered an apology,” Garbus said.

The victim became “very emotional” during her meeting with detectives Monday — and felt vindicated that the truth had finally come to light, sources said.

“She was treated badly,” Boyce admitted.

Webb is currently behind bars for raping four women in Fort Greene while on parole in 1995. Before that, he had served 20 years in prison for raping six women in the 1970s.

A spokesperson for the DA’s Office said the statute of limitations in the Prospect Park case expired over a decade ago, “making criminal charges legally impossible.”

“The point is to get this woman some closure,” he said.

When asked for comment from Miller, an NYPD spokesperson referred The Post to his deposition.

Additional reporting by Danika Fears