An inmate at Chester County prison committed suicide in his cell three days before Christmas, county officials said Thursday.

Jason Walling, 34, was discovered hanging in his cell by a correctional officer during early-morning rounds on Dec. 22, officials said. He was taken to Chester County Hospital and pronounced dead at 2:55 a.m.

The coroner's office ruled the death a suicide, county officials said, and county detectives completed an investigation.

"The problem that every prison has is if somebody wants to commit suicide, unfortunately, it's very hard to stop them," said District Attorney Tom Hogan.

Walling had not been under suicide watch and had been medically cleared, Hogan said.

Officials discovered he had written and not yet sent letters to his family members saying he had decided to commit suicide, "so that when they found his body they would know what he'd done," Hogan said.

Walling, of West Chester, was arrested on Nov. 30 on charges of stalking, harrassment and assault.

There were 92 suicides by state and federal prisoners in Pennsylvania between 2001 and 2013, according to the Bureau of Justice Statistics.

- Justine McDaniel