WARREN, Maine — Shaun Libby, 32, of Standish was a teenager when he killed a man while trying to rob a gas station. He has grown up a lot since then.

On Wednesday, Libby and eight other men received degrees from a Maine State Prison college program.

It has been proven by myriad studies that obtaining a college degree in prison reduces the chance that inmates will commit new crimes and end up back in the system. Libby, who has 20 years left on a 40-year sentence for murder and robbery, quoted those statistics as he spoke at his commencement in front of family and teachers gathered in the visitation room at the prison.

“In essence what you’re doing for us is giving our freedom back. How do you thank someone for that? The only way is to succeed. We’re going to do everything we can to succeed,” Libby said to the people involved in the program who were sitting in the crowd Wednesday.

Like several of the inmates who gave speeches, Libby got choked up at times, including when he looked out to the crowd to thank his family for their support.

“The fact that I’m in prison is not a reflection on you. The fact that I’m here today is a reflection on you,” Libby said as he looked to his tearful mother, Bonnie Libby.

Prison Warden Patricia Barnhart, who attended the ceremony, said, “The families have tears on their faces — they’re finally tears of joy.”

The program, supported entirely by philanthropist Doris Buffett’s Sunshine Lady Foundation, offers University of Maine at Augusta classes to certain inmates who prove through their behavior and applications that they want to attend college. The inmates work through about two classes per semester toward bachelor’s degrees in liberal arts. The program now supports about 40 students at a cost of about $55,000 a semester plus $7,000 for books. The students pay nothing.

Libby was one of three men awarded a bachelor’s degree on Wednesday. The other two were Foster Bates and Joseph Jackson. These were the first bachelor’s degrees Maine State Prison inmates have earned as the program is only 6 years old.

The other five men at the ceremony earned associate degrees. They were: Ryan Currier, Jon Dyer, Edwin Keys, Steven Lewicki, Christopher Shumway and Shaun Tuttle.

The student-inmates are exceptional, according to Deborah Meehan of the University College at Rockland, which administers the program. According to Meehan, the inmates are more dedicated to their studies — such as history, English, communications and sociology — than the typical college student. As an example, she cited the group’s grade point average.

“The average GPA in this set of graduates is 3.5. I’d like to see any other class of students anywhere boast that GPA,” Meehan said, addressing the crowd. Turning to the graduates, she said, “No one can ever take this degree away from you.”

Eight of the nine students who wore traditional caps and gowns for Wednesday’s ceremony graduated with honors. The remaining student graduated with above-average grades.

It’s unclear what’s next for the three men who received their bachelor’s degrees. Rumors of a master’s degree program were flying at the ceremony, but that is not now offered.

Doris Buffett, the program’s benefactor, attended the ceremony and said afterward that she is working with people to think of a sustainable next step for the men who remain incarcerated at the Maine State Prison. The program does not take any time off the men’s sentences but aims to prepare them for when they do get out.

“I’m serving 47 years in prison,” said Shaun Tuttle, who was presented an associate degree. “Prison changes people — for better or worse. We have made a conscious decision to change for the better.”