JONESBORO, Ark. — The end, if it can be called that, came all of a sudden.

After nearly two decades in prison for the murder of three young boys, Damien Echols, Jason Baldwin and Jessie Misskelley Jr., commonly known as the West Memphis Three, stood up in a courtroom here on Friday, proclaimed their innocence even as they pleaded guilty, and, minutes later, walked out as free men.

The freeing of Mr. Echols, 36, was the highest-profile release of a death row inmate in recent memory. Mr. Baldwin, 34, and Mr. Misskelley, 36, had been serving life sentences.

In keeping with the tenor of this case since its first horrific hours, the circumstances of the release were bizarre, divisive and bewildering even to some of those who were directly involved.

Under the terms of a deal with prosecutors, Mr. Echols, Mr. Baldwin and Mr. Misskelley leave as men who maintain their innocence yet who pleaded guilty to murder, as men whom the state still considers to be child killers but whom the state deemed safe enough to set free.