The first prisoner to be freed under Massachusetts’ new medical parole law is home in Centerville after the state Department of Correction approved his appeal for early release.

Alexander Phillips, a 31-year-old inmate diagnosed with terminal cancer, was released Thursday from the Massachusetts Correctional Institution at Norfolk.

Phillips is the first inmate to be released under the new program that allows the state to release inmates who can prove they are terminally ill or so incapacitated that they are no longer a safety risk. The program was part of a broad package of criminal justice reforms signed by the governor in April.

In passing the bill, Massachusetts became one of the last states in the nation to create what is often called “compassionate release,” allowing prisoners to die beyond the prison walls and to save taxpayers the costs of caring for sick inmates.

“It is so great to be home,” Phillips said Tuesday, frail and breathing heavily. “It was a battle to get here.’’

Phillips is one of seven inmates who have filed a petition for medical parole since the program’s inception, according to the Department of Correction.

Another unidentified inmate has been granted release but is still incarcerated, according to DOC spokesman Jason Dobson. Three petitions are pending, one has been denied, and one inmate died days after filing his request, Dobson said.

Phillips was released after serving 12 years of an 18- to 20-year sentence after pleading guilty to manslaughter in the 2006 stabbing of a former schoolmate, Anthony Rano, 19, of South Yarmouth.

Rano’s stepfather, Bob Rano, criticized the state’s decision. He said his family has never recovered from losing Anthony, and Phillips is still a threat to society.

“I have to go to his house and make all the neighbors aware of what they have living next to them,’’ he said. “It’s not right.”

Department of Correction Commissioner Thomas A. Turco III first rejected Phillips’ request in June. In a letter dated Oct. 24, Turco said he reversed his decision after noting that Phillips had suffered a “significant decline” in his condition.

“I have determined that Mr. Phillips is currently terminally ill within the meaning of the statute and does not pose a public safety risk at this time,’’ Turco wrote. “I also believe that Mr. Phillips will live and remain at liberty without violating the law and that his release will not be incompatible with the welfare of society.”

Phillips is now under the supervision of the Parole Board, which implemented a curfew between 10 p.m. and 6 a.m. Phillips also is required to have drug and alcohol testing and wear an electronic monitor at the discretion of his parole officer.

Phillips said he is relieved to be out and adamant that he is not a danger. He says his cancer has moved into his liver, lungs and spine and doctors say he has a year to live. He has lost 25 pounds in the last several months, now carrying 135 pounds on his 5-foot-8-inch frame. He spends most of his time resting — first on his prison cot and now his couch.

“I have trouble getting up. I have trouble walking, shortness of breath,’’ he said. “There is no way I could be a menace to society. I can’t even get up half the time.”

Phillips mother, Anne Burke, is an oncology and hospice nurse. She said she fought for her son’s release because he didn’t want to die in prison. She also noted he was a model prisoner, tutoring other inmates and earning a bachelor’s degree in liberal studies from Boston University Metropolitan College. “We are extremely grateful,’’ she said.

Both Burke and Phillips said they understand how his release pains the Ranos family. “I would like to apologize to her,’’ he said, referring to Rano’s mother, Audrey. Phillips was convicted of stabbing Anthony in a fight over a woman. “What happened that night could have been different.”

Cape and Islands District Attorney Michael O’Keefe said he supports the idea of allowing inmates out on medical parole, but the program brings many risks.

“One would hope that he has made an appropriate decision that this person is not a threat to any person in the community,’’ he said. “Because obviously if something were to occur … that would be a significant problem.”

And while Phillips is grateful to be out, he is also mindful of others who are similarly sick still behind bars.

Dozens of Massachusetts state prisoners die each year, mostly of natural causes. Some of them areburied in state-run prison cemeteries. And deaths behind bars are expected to increase with the aging population. The number of inmates age 55 and older jumped from 1,196 on Jan. 1, 2010, to 1,582 on Jan. 1, 2018, state data shows.

“I knew a lot of people may have been worse off than even than I was,’’ he said. “Leaving them behind me and coming home was a little hard.”

The New England Center for Investigative Reporting is a nonprofit news center based out of WGBH News and Boston University. NECIR intern Alejandro Serrano contributed to this report. McKim can be reached by email at jenifer.mckim@necir.org