A lot of things fueled the July 18 riot at the Dolph Briscoe Unit in Dilley in South Texas. Prisoners were increasingly upset about the coronavirus pandemic. They couldn’t have visitors or make phone calls. The prison was understaffed. The medium-security unit wasn’t supposed to hold high-risk prisoners, but it did. The local temperature hit 102 degrees.

But one thing helped make the chaos possible: lame locks. At Briscoe and many other prisons across Texas, prisoners can let themselves out of their cells whenever they want, sometimes using tools as simple as a shoelace and a bar of soap. More than a dozen current and former corrections department employees told the Marshall Project about prisoners opening up their locked cells from Amarillo to Texarkana.

Sometimes when they “pop out” of their cells, prisoners just mill around and talk. But other times they get violent, with guards or with each other. At Briscoe in July, officials say dozens of prisoners swarmed a day room and took a 21-year-old guard hostage for more than two hours.

Prison officials have known about the faulty locks for years, according to retired senior staff.  “Manipulation of locks is nothing new,” said Lance Lowry, a corrections officer and union official in Huntsville. “Officer deaths and assaults are just not a priority for the agency.”

Jeremy Desel, a spokesman for the Texas Department of Criminal Justice, said that assertion “is not just false, it is completely offensive,” adding that incidents in which prisoners break out of their cells are always considered emergencies that are referred to the highest levels of the agency for review.

“The issue of lock manipulation could not be taken more seriously,” he said.

Though keeping prisoners locked up may seem like the most basic task for a corrections department, the inability to do so isn’t unique to Texas; last year in Arizona, the prison system director abruptly retired after an investigation into the agency’s failure to fix broken locks even when they were linked to assaults and deaths.

“There’s no greater responsibility that the agency has than to keep the people in custody and the staff there safe,” said Michele Deitch, a senior lecturer on prisons at University of Texas at Austin. “This problem makes that all but impossible.”

Prisoner advocates and policy experts like Deitch have been pushing for years for the creation of an independent oversight body to monitor and prevent recurring problems in state prisons, including concerns about conditions, medical care, and security.

How are prisoners able to pop their locks? At some prisons, the locks simply get old and worn down enough that the latches don’t work properly. At others, several prisoners told us they shove cardboard, dominoes, wadded-up paper, or the tiny green bars of state-issued soap into the door while it’s open to make sure the latch doesn’t fully engage. Once the door is closed it will look fully shut, though it won’t be secured, employees confirmed. Sometimes that triggers an alert, but guards don’t always follow up and check.

When a prisoner wants to open a cell door, a carefully placed shoelace or a piece of metal or even cardboard is enough to jimmy the lock, according to prisoners at three different units who said they’d done it themselves.

“Some folk get those damn doors off with toothpaste powder and dental floss,” said a former lieutenant at the maximum-security Telford Unit in East Texas, who asked not to be named because he still works in law enforcement.

Statewide there’s even a slang term for the practice: keying the door. One former employee showed the Marshall Project a video of a coworker in South Texas demonstrating exactly how it’s done.

Video sent from one prison this year showed men in an ostensibly locked-down unit meandering around after they’d slipped out of their cells to hold what a narrating voice described as a “gang meeting.” Days later, a different video shot in the same prison showed two men popping out to fight in the dayroom until one knocked the other nearly unconscious and dragged him back to his cell.

Some prisoners said that people are popping out more often now that the pandemic has heightened tensions and ushered in months-long lockdowns. The whole situation makes them feel in danger, they said. Guards are also concerned. Current and former officers recounted assaults on their coworkers by men who’d unlocked their doors, and one prisoner described carrying out such an assault himself.

“It makes me feel unsafe,” said Tanisha Woods, a local union president and sergeant in Gatesville.

One solution would be to replace the problem locks or retrofit them with metal plates that would prevent prisoners from inserting that final piece of metal or cardboard needed to open the door.

But that could be costly, and officials said it might not be foolproof either. An internal document obtained by the Marshall Project showed that the agency allotted $8 million for lock replacements at 2 of its 104 prisons during the current two-year budget cycle. Desel, the TDCJ spokesman, said the spending is not related to concerns about prisoners defeating the locking mechanisms.

State senator John Whitmire, the Houston Democrat who oversees the Senate Committee on Criminal Justice, said he was initially shocked to learn of the problem. “It contradicts everything we think about the Texas prison system,” he said.

After calling the TDCJ director to learn more about how prisoners were able to get out of their cells, and whether officials knew, Whitmire added: “They’re fully aware of it, it’s not a monetary issue—it’s just trying to stay ahead of the offenders.”

TDCJ’s executive director, Bryan Collier, said the agency has been working on solutions, including trying out prototypes for new lock plate covers. “It’s not a game but a constant battle,” he said.

“Anywhere you have electronic locking systems,” he added, “unfortunately you can have offenders that manipulate the lock.”

Officials say the July 18 unrest at Briscoe didn’t start until the evening, though one prisoner told his family that men had been popping out of their cells all day. According to three sources familiar with the situation, several of those involved were maximum security prisoners—though the unit was designated medium and minimum security.

Eventually, the warden negotiated a truce, and the prisoners released the guard, a little roughed up but not injured, officials said. Then the men started fighting with one another until officers gassed the whole wing and shipped 98 prisoners to higher-security lockups nearby.

Desel confirmed some basic details about the incident, but said he could not comment about the security levels of the prisoners involved.

In the days after the riot, the agency sent out a team of top officials to complete a review; deputy inspector general Joseph Buttitta said investigators and prosecutors are working to bring charges against at least six of the prisoners involved.

To Jennifer Erschabek, executive director of the Texas Inmate Families Association, the vulnerabilities in the locking systems and the agency’s failure to address them call into question the point of locking people up in the first place.

“What is the definition of security if inmates won’t even remain locked in their cells?” she said. “What is the purpose of the prison system?”