NASHVILLE, Tenn. (AP) — A longtime prison reform advocate was sentenced to 40 years behind bars on Thursday following his conviction for hiding guns, ammunition, handcuff keys and hacksaw blades inside the walls of Nashville's new jail while it was being built.

Judge Steve Dozier sentenced 53-year-old Alex Friedmann after a jury found him guilty in July of vandalism that caused more than $250,000 in damage.

Friedmann's attorney asked Dozier to give Friedmann a prison term on the lower end of the 25- to 40-year sentencing range, while prosecutors sought the maximum.

Friedmann didn't testify at his trial and investigators could not pinpoint a reason for his actions in a search of his home. He has since said his actions were the result of a mental breakdown triggered by memories of being raped in jail decades ago.

Dozier said he was “suspect” of Friedmann's claims and described the evidence presented at trial and in sentencing as “Guns, guns, guns and more guns."

In a letter to Dozier, Friedmann said he was gang-raped in the old Nashville jail as an 18-year-old when he was arrested for armed robbery in 1987. Before the new jail was built, he was allowed to tour the old jail as the managing editor of “Prison Legal News” in 2016, he wrote, correcting that he previously said the tour was in 2018. Seeing the cell where he was raped caused nightmares, flashbacks and panic attacks, and he hid guns and escape kits throughout the new jail in an irrational attempt to combat his fear, he wrote.

Friedmann apologized during the hearing Thursday, saying he should have sought mental health treatment long ago and that his actions at the jail were “completely divorced” from his advocacy.

“While my life is effectively over, the need for meaningful reform remains,” Friedmann said.

Davidson County Sheriff Daron Hall, who oversees the jail, has suggested that Friedmann was planning a massive jailbreak, calling his actions “evil.” Testifying Thursday, Hall called Friedmann's rationale “outlandish” and “sensational” and said Friedmann “has had second chances and deserves no more.”

The judge said the “most important unknown” in Friedmann's rationale is what he thought he might get arrested for that would warrant planting items in the jail.

In a related case in federal court, Friedmann pleaded guilty in August to being a felon in possession of a firearm.

Federal authorities say Friedmann contracted someone to build a 200-square-foot, fireproof storage area — determined to be a place to practice plans for the jail — in a basement area of one of the buildings at a Nashville complex where he owned a condominium. They say Friedmann moved locked storage crates to a friend’s house in nearby Joelton that contained more than 20 firearms, including assault rifles, handguns and shotguns. He’s awaiting federal sentencing.

Much of what happened at the new $150 million Downtown Detention Center was caught on surveillance video and went undisputed at that trial.

Friedmann, meanwhile, offered letters of support from leaders of other advocacy groups and other people who pointed to his record of successfully pushing for criminal justice reforms.

Prosecutors said Friedmann had already been going in the building for several months when a sheriff’s office official first noticed in December 2019 that two keys were missing from a set at the new jail.

Surveillance video showed the same person who took the keys entering the jail numerous times and doing some type of work on the walls. When he entered again on Jan. 4, 2020, Friedmann was stopped in a secure area while police were called. During the wait, Friedmann took jail schematics out of his pocket, ripped them up and ate them, prosecutors have said.

As an activist against prison privatization, Friedmann had worked with Hall on the future of another Nashville jail — one that had been privatized but was returning to the control of the sheriff’s office. That is why Hall said he knew the security breach was serious when he learned the intruder was Friedmann.

Ahead of his sentencing, Friedmann managed to draw a court settlement with Tennessee prison officials over their use of solitary confinement for pretrial detainees.

Friedmann sued the Tennessee Department of Correction last year, complaining that he was being housed in one of the most restrictive cells in the most restrictive unit of the Riverbend Maximum Security Institution in Nashville even though he hadn't been convicted of a crime yet.

A federal judge ordered prison officials to move Friedmann out of solitary confinement last November. In an agreement filed last week to settle the lawsuit, prison officials agreed to a series of policy changes that are to be implemented by the end of the month.

Copyright 2022 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.