Alice Sebold, the author of bestselling book “The Lovely Bones” and memoir “Lucky,” has apologized to Anthony Broadwater, the man she misidentified as her rapist 40 years ago.

In a Medium post, she wrote, “First, I want to say that I am truly sorry to Anthony Broadwater and I deeply regret what you have been through. I am sorry most of all for the fact that the life you could have led was unjustly robbed from you, and I know that no apology can change what happened to you and never will.”

Broadwater was exonerated of his rape conviction last week after an executive producer on the movie adaptation of “Lucky” left the project when he began to raise concerns about the events surrounding the trial.

Sebold wrote that “As a traumatized 18-year-old rape victim, I chose to put my faith in the American legal system. My goal in 1982 was justice — not to perpetuate injustice.”

In addition, publisher Scribner announced it would pull the “Lucky” memoir “while Sebold and Scribner together consider how the work might be revised,” the L.A. Times reported.

Though the author, who was then a Syracuse University freshman, did not identify Broadwater in a police lineup, she later identified him in court. She wrote about her assault in her memoir, which had been planned as a film adaptation starring “You” actress Victoria Pedretti. The film is no longer moving forward.

Executive producer Timothy Mucciante left the production in June amid his doubts about how the trial was depicted in the screenplay. Broadwater, who had served 16 years in prison, then hired an attorney who was able to get the conviction overturned.

“I am grateful that Mr. Broadwater has finally been vindicated, but the fact remains that 40 years ago, he became another young Black man brutalized by our flawed legal system. I will forever be sorry for what was done to him,” Sebold wrote.

“I will continue to struggle with the role that I unwittingly played within a system that sent an innocent man to jail,” Sebold wrote.

The author wrote that she will also struggle with the fact that her actual rapist may have gone on to attack other women.

Broadwater told the New York Times last week that he hoped there would be an apology. “I sympathize with her,” he said. “But she was wrong.”