Here is the most mind-boggling revelation in Shane Bauer’s new book American Prison: In the 19th century, when leasing Southern convicts to outside businesses was a normal practice, the death rate for these prisoners was greater than the death rate in the Soviet gulag.

“And even more than the death rate during slavery,” says Bauer, whose book is a history of how prisoners have for centuries been used as slave labor, intertwined with the story of Bauer’s time as a guard in a for-profit Louisiana prison. “There are states that had a 25 percent death rate among prisoners. Under slavery, a slave was property, something you had to take care of. Under leasing, they were just a number. If a prisoner died, there was no penalty; they’d just get another prisoner.”

Same as it ever was. Even though convict leasing no longer exists, the profit motive is still a major factor in the American penal system. A recent prisoner strike that ended just weeks ago was an attempt to draw attention to horrendous conditions in the nation’s penitentiaries, including lack of recreation and educational facilities, poor medical care, nearly inedible food, and prisoner pay for work performed that is so low—as little as 1 cent per hour—it might as well be slave labor.

“When you hear prisoners make connections between prison and slavery, we need to dig into this and understand this is not an off-the-cuff remark,” says Bauer. “The situation of prison labor today grew out of the slave system. Forcing prisoners to work, mostly for free, the nature of that reality hasn’t really changed.”

American Prison describes how slavery helped create enormous wealth in the South, since it was “the most productive system of non-mechanized cotton production the world had ever known.” And even though the 13th Amendment abolished the practice, it left a huge loophole that Southern states took full advantage of. The amendment stated that “neither slavery nor involuntary servitude” were legal, “except as punishment for crime.”

Bingo! This legalistic bait-and-switch allowed states to use prisoners as forced labor, in many cases leasing them out to plantations, mines, textile factories, and other industries. Some penitentiaries even became large factories themselves. “By using convicts,” says Bauer’s book, which notes—surprise! surprise!—that the vast majority were black, “the labor was cheaper, didn’t strike, and it could be driven at a pace that free workers wouldn’t tolerate.”

Bauer’s prison consciousness comes from a unique perspective. In 2009, he and two friends were taken prisoner and charged with espionage when, while out hiking, they accidentally wandered across the border from Iraq to Iran. Bauer was held for nearly two years in the notorious Evin Prison before being released, an experience, he says, that made his undercover prison work in Louisiana almost inevitable.

“I wouldn’t have done [it] if I hadn’t been in prison myself,” he says. “There was this big hunger strike in California prisons happening not long after I got out, so I started digging into that, and then I wrote an expose on long term solitary confinement in the U.S. The American prison system generally is rotten. And the private prison system is just a portion of that (In 2016, private prisons held about 8 percent of the total state and federal prison population. I wanted to get inside private prisons because they are the least known part of the American prison system.”

So Bauer applied to become a guard with the Corrections Corporation of America (CCA), which as of this year runs more than 90 for-profit prison and detention facilities. He was eventually assigned to the Winn Correctional Center in Winnfield, La., a medium security prison (convicts live in dormitories, not individual cells) so underfunded and understaffed it makes infamous penitentiaries like Angola, Attica, and San Quentin seem like Club Meds.

In Winn, where guards made $9 an hour and were not provided with defensive devices like pepper spray or nightsticks, there were no work programs, most of the vocational programs had been eliminated, the hobby shops had been converted into storage units, and the access to the law library was limited. The prison was so understaffed that at meal time there could be 800 prisoners and only two guards. In a prison of 1,500 inmates, there was also no full-time psychiatrist and only one full-time social worker.

“I expected the company would be cutting corners, minimizing services,” says Bauer. “But I was surprised the ways we were being trained. A lot of it had to do with protecting our liability. For example, we were not supposed to intervene in fights.”

Not surprisingly, this cost cutting spawned tension and violence. And not just at Winn. American Prison cites a 2016 Department of Justice study that found that private prisons reported 28 percent more inmate-on-inmate assaults than public prisons, and inmates in private prisons had twice as many weapons. In one four month period, CCA reported finding nearly 200 weapons at Winn, 23 times more than Angola.

Following the release of this federal report, the Obama administration decided to phase out the use of private contractors to run federal prisons, but last year the Trump administration reversed that ruling.

This kind of atmosphere also deeply affected how Bauer performed his guard duties. American Prison goes into detail about how poorly trained Winn’s correction officers were, and a good part of the book is given over to descriptions of Bauer’s interactions with the inmates, and how they changed over time.

“I thought I’d go in, be as human as possible, and it would be fine,” says Bauer, “but I quickly learned it was not that simple, that anyone in prison had to draw a line and defend it. When I tried to be good to prisoners, there were things I simply could not do, and I had to say no, and defend that position.”

Eventually, Bauer saw himself becoming more rigid, obsessed with the conflicts he was having with certain prisoners, and how he was going to deal with them. “When I went home,” he says, “I felt I was two people—the person inside the prison who was stern and firm, and the one who was almost ashamed when I went home.”

Bauer eventually quit after four months on the job, burned out by the pressure. In this, he was not alone. “There was such a high turnover of prison guards” at Winn, he says. “A dynamic I saw a lot was guards when they came in, when they started the job they would be really insistent on having a good relationship with prisoners, which meant they would break a lot of rules. And I saw a lot of people leave because they couldn’t deal with locking people up every day.”

CCA, which has rebranded itself Core Civic, has now found a new source of revenue—it is running immigration detention centers. As of 2016, nearly 75 percent of the immigrant detainee population was held in facilities run by private prison companies. But CCA’s core business is still for-profit prisons, and at least at Winn, it seems they weren’t doing a very good job.

In American Prison, Bauer recounts a conversation he had with a former public jail warden who was visiting the facility. “I don’t know what’s going on down here, but it’s not good,” he told Bauer. “There’s something fucked up, I can tell you that.”

This warden then went on to recount how the prisons where he worked were better staffed, the guards were paid significantly more, they had a 90-day training period (at Winn it was 30 days) and received bonuses if they attended the police academy and passed fitness tests. “This is a joke,” he told Bauer. “This is a free jail to me. Too much shit going on down here. Not no consequences.” He then said that CCA should lose its contract.

In fact CCA, alleging they couldn’t run the prison at the rate the state was paying them, and probably realizing that Bauer’s undercover work would result in a magazine article that would be a public relations disaster (his story in Mother Jones was the basis for American Prison), terminated its contract in 2016. Winn is now run by LaSalle Corrections, yet another for-profit company.

And despite the fact that the private prison industry, which is controlled by a handful of companies, has been found to save states little or no money and is accused of numerous constitutional violations, the number of prisoners they house has grown faster than the general prison population. It’s about saving money, nothing more, nothing less.