A former corrections officer who pleaded guilty to slipping OxyContin pills to inmates in exchange for cash was sentenced to 30 months in prison Monday morning.

Joseph Romano, 31, of Philadelphia, will spend the next two and a half years in segregated housing followed by three years’ probation for engaging in what prosecutors called “the very function he was trusted to prevent.”

“He was a prison guard. He was selling narcotics in prison,” U.S. District Court Judge Paul Diamond said before handing down his sentence.

RELATED: Guards allegedly smuggled drugs into Philadelphia jailhouse

In December, Romano pleaded guilty to attempted extortion and two counts of attempted distribution of controlled substances. This was his first encounter with the law and during his moment of allocution, he acknowledged his crimes.

“I have a long road ahead of me. I want to focus on my recovery. This is the one and only time I’ve ever dealt with legal issues and I will never see the inside of a courtroom again," Romano said.

Romano’s entire family was in federal court for the sentencing Monday, including the mother of his 6-month-old baby.

Defense attorney Maggie Grasso argued her client had been struggling with a physical addiction to OxyContin himself and had cooperated with the government from the very beginning of the investigation. Romano had worked at the Philadelphia Industrial Correctional Center (PICC) up on State Road for nine years.

A federal sting operation led to the indictments of five other corrections officers within the Philadelphia Prison System, who were also charged with supplying drugs and cell phones to inmates in exchange for cash.

RELATED: Councilman urges Philly Prisons Commissioner not to sign contract with health care provider

“He knew the dangers better than anyone,” said Assistant U.S. Attorney Kevin R. Brenner.

Brenner added that before Romano would go to work, he would meet with an individual who he believed to be an associate of a particular inmate and pick up the pills outside the prison. He would then smuggle the pills past prison security and deliver them directly to the inmate. 

“It was a recipe for disaster," Brenner said. "Prisons Commissioner Louis Giorla submitted a letter to the court describing how bringing contraband into prison puts corrections officers in harm’s way. Predators and sociopaths become empowered and when the smuggler is a corrections officer, it shakes morale to its core.”