If his diary and witness accounts are to be believed, Nicholas Pinto endured months of physical, sexual and mental abuse in prison. Guards roughed him up, made him stand naked in a cold cell for hours at a time, and taunted him relentlessly. A fellow inmate raped him night after night, beat him when he resisted, and stole his possessions.

And no one, he claimed, did a thing about it.

"The overall treatment I have received from both the prison and (the prison's) medical providers (is) unconstitutional, insufficient, cruel, inhumane and shamefully unacceptable," Pinto wrote in April.

He feared for his life, yet the officials responsible for his safety appear to have ignored his pleas for help — nor did they heed a warning from the prison chaplain that Pinto was in grave danger.

An accused child pornographer, he was at the bottom of the prison hierarchy. So what came next was perhaps inevitable.

The 29-year-old former Connecticut man was heading back to his cell block from a recreation area when he was ambushed by an inmate with a history of violence who was supposed to be locked down — but wasn't. The inmate knocked him to the floor and stomped on his head at least 15 times "with all his might," according to a police report. Pinto's face was shattered, and he suffered brain injuries that left him comatose.

After the attack, his assailant had enough time to return to his cell and use a rag to wipe evidence from his black sneakers, police said.

The Aug. 8 assault raised troubling questions about prison justice and the culture of the scandal-plagued lockup where Pinto was supposed to be held in protective custody. Multiple investigations are being conducted by local authorities and the state Department of Corrections to try to get to the bottom of how and why Pinto's attacker was allowed to get near him, and a federal civil rights lawsuit is being prepared.

Critics of Lackawanna County Prison in Scranton say the near-fatal assault is part of a pattern in which correctional officers target inmates they don't like. The union flatly denies any malice on the part of the guards, and places the problems squarely on management.

"There's a pattern, and there's a mistreatment," said Patrick Rogan, the lawyer hired by Pinto's family to sue. "What does it arise from? Is it lack of training, or not enough personnel, or just a bad attitude toward inmates?"

Whatever the reason, the prison is certainly no stranger to scandal. Several years ago, the former warden and other officials were accused of using inmates as free labor at their homes. Guards have been previously criminally charged with abusing prisoners, and in 2007 an inmate who arrived at the prison six months' pregnant gave birth, alone, inside her cell, after prison staff ignored her pleas to be taken to the hospital. Several federal lawsuits have alleged a toxic environment of physical abuse and intimidation.

"What goes on there, honest to God, is atrocious. It is serious, serious stuff," said Scott Binsack, a former inmate who shared a cell with Pinto for nearly 10 months.

Sgt. Bill Shanley, a correctional officer at Lackawanna County Prison and president of the prison employees union, blamed the 12-year-old facility's problems on grossly inadequate staffing and a lack of training and equipment, as well as policies that allow for excessive movement of inmates.

Shanley said he has repeatedly pressed his concerns with prison management.

"I said, 'Someone's going to get seriously hurt. It's not IF it's going to happen, but when,'" he said.

Warden Janine Donate declined to comment, citing the ongoing investigations.

Pinto landed in the prison in 2008 following his arrest for taking explicit photos and videos of children. He immediately began a diary that would become a 20-page tale of abuse and humiliation.

He wrote that he was made to stand in cell No. 4 for hours at a time, allowed to sit only after lights out. "Can't sleep in freezing cell, naked, cold concrete and no place to sit. ... I stand for 3 or 4 days," he wrote.

At one point, a guard came by and told him, "See how that s--- works?" Other times, a voice over the public-address system chanted, "4-cell, kill yourself!"

A former inmate who lived on the same block as Pinto confirmed the abuse. The inmate, who spoke on condition of anonymity because he fears retribution against family members who hold local patronage jobs, told The Associated Press that he saw guards brutalize Pinto.

He said he saw guards force Pinto to strip down and stand for prolonged periods in his cell, stomp on his toes while parading him naked in the common room, slap him hard upside the head, and toss his meals in the garbage.

On at least one occasion, Pinto and several dangerous inmates were released into a common area from their cells, and a guard got on the PA system and urged: "Go get 'em, boys," according to the former inmate.

"I watched numerous attacks on him," he said.

Binsack, a former building contractor who recently pleaded no contest to writing bad checks, said he, too, was mistreated at the prison — assaulted by guards and denied appropriate medical treatment for torn retinas and a serious fungal infection in his face and body. Binsack has sued the prison, collecting affidavits from inmates who likewise claim abuse.

He said Pinto lived "in great fear" of certain guards and other inmates.

"I saw him daily get harassed by specific officers. I saw him be spit on," he said.

Shanley, who has worked at the prison for nearly 20 years, said his officers do the best they can but are overloaded and outmanned. He denied that guards are intentionally abusive, saying they are far more likely to be assaulted by an inmate than the other way around.

"Do I think there are officers here, in malice, trying to do something to harm somebody? No, I don't. Is there physical abuse where an officer is bringing a guy down, or kicking him, or allowing one inmate to sexually assault another inmate? No, that's not happening."

Pinto's diary, though, tells a different story.

He wrote that he was repeatedly sexually assaulted by an inmate he dubbed "the silverback."

"First night is bleeding but no penetration," wrote Pinto, who also referred to his rapist by name. "The next night (and never again, he lies) is full-on jailhouse Bubba."

He reported the rape to authorities, but no investigation was conducted, said the Rev. William Pickard, a Catholic priest and the prison's longtime chaplain.

Pickard wrote a letter to the Lackawanna County commissioners on March 30 of this year complaining that prosecutors had failed to look into Pinto's allegations, "resulting in additional sexual assaults and continued denial of medical treatment."

Pickard also warned that Pinto's outspokenness about his prison experience made him "a likely target of severe institutional retaliation," and suggested that he be transferred to another lockup.

District Attorney Andy Jarbola did not return messages left by The Associated Press.

In an interview, Pickard said he doesn't believe the Aug. 8 attack on Pinto was simply a mix-up or a lapse in protocol.

"I don't think it was just a mistake. I think there was something more going on here," he said.

The chaplain, who has been ministering to inmates at the prison for a quarter-century, was banned from the prison earlier this month after being accused of pushing a guard who had refused to let him near Pinto in the hospital. Pickard said he was angry, but denies he got physical with the guard.

Pinto, who had pleaded guilty to a federal count of production of child pornography and was due to be sentenced in October, was recently moved from a Scranton hospital to a long-term acute-care facility.

Though he pleaded guilty to a reprehensible crime, Rogan, the attorney preparing to sue, said Pinto's punishment should have been meted out in a courtroom, not a prison.

"We are a humane society. You don't get to kick somebody's brain in," he said. "Or you shouldn't get to."