WASHINGTON ― When Republican presidential candidate Donald Trump announced Indiana Gov. Mike Pence as his running mate last week, it was a nod to the conservative establishment. Pence is a safe bet, a midwesterner who gets along with evangelicals, the tea party and House Speaker Paul Ryan. He’s also a far-right politician with a history of chasing political capital at the expense of groups like LGBT Americans. Lesser known is the time Pence took a stand against a federal law to prevent prison rape.

George W. Bush signed the bipartisan Prison Rape Elimination Act, or PREA, in 2003, and the standards were finalized by the Obama administration in 2012. The law aims to combat sexual abuse in correctional facilities through requirements like housing youth separately from adults, firing staff who commit sexual abuse, and granting victims access to medical examinations and emotional support services.

Sex abuse in American lockups is not a hypothetical problem. There were over 8,700 allegations of sexual victimization reported by adult correctional facilities in 2011, according to the Justice Department. Only about 10 percent were substantiated, although many incidents go unreported or un-investigated. LGBT inmates are particularly at risk for abuse: More than a third of transgender inmates held in prisons or jails reported at least one incident of sexual victimization in the previous year.

In 2014, states and territories were supposed to promise, at a minimum, to work toward compliance with the law. More than 40 states did; Indiana was not among them. In a letter to then-U.S. Attorney General Eric Holder, Pence said the standards and timeline “cannot be met,” and claimed “there is little empirical data showing these standards to be effective.” He complained his state would have to hire staff and take other steps that would “require a redirection of millions of tax dollars.”

He said Indiana had already taken its own action to change policies in response to PREA, and the Justice Department’s standards worked to “bind the states, and hinder the evolution of even better and safer practices.” He finished his letter by encouraging the administration to “reexamine current expectations” and “provide states greater discretion.”

Pence wasn’t the only Republican governor to take a stand against PREA that year. Former Texas Gov. Rick Perry, then a possible contender for the 2016 Republican presidential nomination, called the requirements “unnecessarily cumbersome.” The underlying political context was clear: Republicans found an opportunity to fight what they perceived to be another example of overreach by the Obama administration. But a Justice Department staffer pointed out at the time that if states refused to comply, under law they would be “held accountable”—primarily by facing financial penalties.

In the same way Pence backed changes to his state’s so-called religious freedom law after a national outcry, he appeared to change course on PREA. In July 2014, he brought in “new leadership to coordinate public safety,” and directed a review of these issues, said Kara Brooks, a spokeswoman for Pence, in an email. “One of the resulting policy changes was to become compliant with [PREA],” she said, and in 2015, a letter was sent to the Justice Department indicating Indiana’s intentions. Brooks told HuffPost they are “confident” the state will move toward compliance by the end of the year.

When asked by HuffPost why Pence initially tried to defy PREA implementation, Brooks took issue with that characterization. “There were procedural issues with the manner in which DOJ administered the program which made it difficult to have adequate auditors to complete the necessary compliance audits required,” she said.

Advocates working on this issue see it differently. “Governors from across the political spectrum stood together to solve prisoner rape; Gov. Mike Pence was not one of them,” said Chris Daley, deputy executive director of Just Detention International, an organization that seeks to end sexual abuse in detention facilities.

“By rejecting federal efforts to end sexual abuse in Indiana, Pence put his political career ahead of the safety and wellbeing of thousands of people in his custody.”