PORTLAND, Maine (AP) — Lawyers struck a deal on Wednesday in a review of a nearly 30-year-old murder case that will allow a man convicted of the killing to go free.

Anthony Sanborn Jr., 45, served 27 years for the 1989 murder of 16-year-old Jessica Briggs. Prosecutors and defense attorneys reached a deal designed to keep Sanborn out of prison following new evidence from a former key witness that emerged in the case.

Sanborn was out on bail while his attorneys went to court. Wednesday's deal ended 21 days of review hearings in a case that has generated considerable media attention in Maine. Sanborn's now released from bail conditions he has lived under since his release from prison in April.

Sanborn's attorneys agreed to withdraw their post-conviction petition, and Sanborn agreed to time served, the Portland Press Herald reported .

That means Sanborn's conviction stands, but he does not go back to prison. He had been sentenced to 70 years for the killing of Briggs, his one-time girlfriend.

"There is only one judge who can ultimately judge me, and that is God. And I will be judged to be innocent when my time comes," Sanborn said in a statement read by one of his attorneys after the hearing concluded.

Sanborn's attorneys said after the hearing that they continue to believe Sanborn is innocent, and the outcome is not ideal. Assistant Attorney General Meg Elam said prosecutors stand by Sanborn's murder conviction as fair.

Elam said the deal was "a just outcome for all involved, but most important for Jessica Briggs and for her family." Jessica Briggs' stepmother Susan Briggs said she "never doubted he did it."

The end of the case means Justice Joyce Wheeler isn't going to make a statement about whether Sanborn's trial was fair. There was never any physical evidence that tied him to the murder, and he has maintained his innocence since his arrest in 1990.

A critical moment in the case came when a key witness confirmed that she recanted her testimony that helped convict Sanborn in his 1992 trial. Hope Cady, 13 at the time of the killing, was presented at the trial as the sole eyewitness. She testified that she saw Sanborn, then 16, stab Briggs on the Maine State Pier.

Cady, whose vision was later tested and revealed to be so poor that she could be considered legally blind, stunned a courtroom when she recanted in April. She said again on Tuesday that she was coerced by Portland police to implicate Sanborn.