Updated

JONESBORO, Ark. -- Three men convicted of killing three 8-year-old Cub Scouts and dumping their bodies in an Arkansas ditch were freed from nearly two decades in prison Friday, after they agreed to plead guilty to secure the release of one of them from death row.

Under the plea bargain, Damien Echols, Jason Baldwin and Jessie Misskelley were being freed immediately. The boys' families were notified about the pact ahead of time but were not asked to approve it.

The defendants, known by their supporters as the West Memphis 3, agreed to a legal maneuver that lets them maintain their innocence while acknowledging prosecutors have enough evidence against them.

"I am innocent of these charges but I am entering an Alford guilty plea," Echols told the judge. Baldwin and Miskelley also reasserted their innocence.

"Although I am innocent, this plea is in my best interest," Misskelley said.

More On This...

    The three were credited with time served, and Echols is being freed from Arkansas' death row. They were placed on 10 years' probation and if they re-offend they could be sent back to prison for 21 years, Prosecutor Scott Ellington said.

    "I believe that it would be practically impossible after 18 years to put on a proper trial in this case," Ellington said.

    "I believe this case is closed and there are no other individuals involved," he said.

    Baldwin and Echols each pleaded guilty to three counts of first-degree murder. Misskelley pleaded guilty to one count of first-degree murder and two counts of second-degree murder. The Alford plea allows the men to maintain their claims of innocence.

    After the hearings, Baldwin told reporters that he had been reluctant to plead guilty to crimes he maintains he didn't commit, but that they agreed to the deal because they had to get Echols off death row.

    "That's not justice, however you look at it," he said.

    Echols thanked Baldwin and called his release "overwhelming."

    "It's not perfect," he said of the deal. "It's not perfect by any means. But it at least brings closure to some areas and some aspects."

    He said the West Memphis Three would continue to work to clear their names.

    Get complete analysis of the West Memphis Three case from Judge Jeanine – Saturday at 9 p ET on Fox News

    Echols' wife, Lorri, sat in the front row of a crowded courtroom, next to Pearl Jam frontman Eddie Vedder, who became a key supporter of the men after watching a pair of HBO documentaries about the case. Vedder put his arm around her during the proceedings.

    The three defendants were expected later Friday at a news conference in the courtroom basement.

    Circuit Judge David Laser acknowledged the case was complex, and that both the victims' families and the supporters of the three men convicted had suffered. He said he thought Friday's deal would serve justice "the best we can."

    "I don't think it will make the pain go away," Laser said during the court proceedings.

    One person yelled "Baby killers" as the three left the courtroom.

    The May 5, 1993, killings were particularly gruesome. Steve Branch, Christopher Byers and Michael Moore were found nude, and hogtied, and rumors of Satanism roiled the community in the weeks following their deaths. Branch and Moore drowned in about 2 feet of water; Byers bled to death and his genitals were mutilated and partially removed.

    Police had few leads until receiving a tip that Echols had been seen mud-covered the night the boys disappeared. The big break came when Misskelley unexpectedly confessed and implicated Baldwin and Echols in the killings.

    "Then they tied them up, tied their hands up," Misskelley said in the statement to police, parts of which were tape-recorded. After describing sodomizing and other violence, he went on: "And I saw it and turned around and looked, and then I took off running. I went home, then they called me and asked me, `How come I didn't stay? I told them, I just couldn't."'

    Misskelley later recanted, and defense lawyers said the then-17-year-old got several parts of the story incorrect. An autopsy said there was no definite evidence of sexual assault. Miskelley had said the older boys abducted the Scouts in the morning, when they had actually been in school all day.

    Misskelley was tried separately, convicted of first- and second-degree murder, and sentenced to life in prison plus 40 years. He refused to testify against the others and his confession was not admitted into evidence.

    Defense lawyers for Echols and Baldwin alleged juror misconduct, saying they heard about the Misskelley confession anyway. Attorneys also said there wasn't enough physical evidence linking the three to the crime scene.

    The Arkansas Supreme Court upheld Echols' conviction and death sentence in 1996, saying there was still enough other evidence to sustain it.

    A 1996 HBO documentary, "Paradise Lost: The Child Murders at Robin Hood Hills," drew the attention of celebrities including Vedder and Natalie Maines, lead singer of the Dixie Chicks. They and other celebrities helped fund a legal team that worked to win the three a new trial.

    "Why are they innocent?" Vedder said in an interview with The Associated Press last year. "Because there's nothing that says they're guilty."

    Last fall, the Arkansas Supreme Court ordered a new hearing for the three and asked a judge to consider allegations of juror misconduct and whether new DNA science could aid the men or uphold the convictions.

    In upholding Echols' conviction in 1996, the state Supreme Court noted that two people testified Echols bragged about the killings, an eyewitness put Echols at the scene, fibers similar to the boys' clothing were found in Echols' home, a knife was found in a pond behind Baldwin's home, Echols' interest in the occult and his telling police that he understood the boys had been mutilated before officers had released such details.