Karriem Saleem El-Amin, Alexander Mustafa

Karriem Saleem El-Amin (facing camera) embraces Alexander Mustafa outside the Baltimore courthouse. El-Amin and five other men convicted in killings were freed as a result of a court ruling. (Baltimore Sun photo by Kim Hairston / July 25, 2013)

Six men convicted in killings exited a side door at the Baltimore courthouse Thursday after spending more than half their lives in prison — their freedom secured by a court ruling that found they had received unfair trials because of improper jury instructions.

The men, all convicted in the 1970s, walked across Lexington Street into a crowd of relatives and supporters, who flung their arms around them.

"My mother's rejoicing in heaven," said Paula McCallister, after watching her brother, Zachary McCallister, 55, walk free under a sunny sky after nearly 40 years in prison. He was convicted in the 1974 armed robbery and killing of a butcher shop owner.

"I thought I would never see this day," Paula McCallister said.

The decision by the Maryland Court of Appeals has led to the release of 14 other inmates in the city and could affect up to 200 cases statewide.

The inmates released Thursday had signed agreements with prosecutors that allowed their release even though their convictions stand. Those agreements were approved by a Circuit Court judge.

Prosecutors could not find family members of victims in those cases, and nobody spoke in court against letting them go. But plans to set other inmates free have been met with outrage from relatives confronting painful memories as they struggle to understand how decades-old legal errors could reopen long-closed cases.

Around the state, prosecutors say they're fighting to keep violent offenders behind bars, but officials in the city are setting free some prisoners they contend don't pose a risk to public safety.

The men face many challenges as they re-enter society. A team of social workers, professors and students at the University of Maryland's clinical law program and the state public defender's office say they have tried to build a safety net to help them.

"These guys are going through something that really no one else can truly understand," said Rebecca Bowman-Rivas, clinical counselor and program manager with the University of Maryland's law and social work services program. "So we're trying to create a community."

The team will help connect the men with medical care, jobs and social services. A grant from the Open Society Institute is paying the salary of a social worker to assist them.

Women wept on the courthouse benches and in hallways after watching the men sign the agreements that set them free.

Kevin Cook, whose brother, Karriem Saleem El-Amin, had been imprisoned for 42 years, felt his eyes fill with tears while he watched his brother in the courtroom.

"I always believed he would [get out], but I didn't know when," Cook said in a hallway outside the courtroom, bringing his hand to his face as he began to cry again. Cook was about 15 when his brother was locked up.

He said his 60-year-old brother, who converted to Islam in prison, has secured a job in a bakery. El-Amin was convicted in 1971 for the armed robbery of a grocery store in which a proprietor and an accomplice of the robbers were killed.

Public defenders said he was identified as having been at the scene with a gun but was never shown to have shot the victims.

All of the men had been sentenced to life in prison, and they have been resentenced to time served. Their release wasn't based on evidence in their cases but on an appellate ruling that their trials were fundamentally unfair. At issue was whether jury instructions given in Maryland before 1980 left room for defendants to be convicted even in the presence of reasonable doubt.

In all of the cases presented Thursday, the men will be placed under supervised probation.

Hours after the first hearings began, a crowd of loved ones, law students and other supporters gathered across the street from a side door of the courthouse. Passers-by asked what was going on as two men wheeled a blue cooler down the sidewalk and passed out cold soft drinks to the crowd waiting to see the prisoners freed.

More hearings are expected this summer. Another man was scheduled to appear in court Thursday but could not attend because of medical problems, according to the public defender's and the prosecutor's offices.