(Reuters) - St. Louis will install temporary air conditioners in a city jail known as “the workhouse” after temperatures in the city topped 100 degrees Fahrenheit, triggering protests outside the lockup, the mayor’s office and local media reported on Saturday.

Police used pepper spray to disperse about 150 demonstrators outside the city’s Medium Security Institution (MSI) protesting the sweltering conditions in which inmates were being held, according to the St. Louis Post-Dispatch and other news outlets. At one point, some protesters scaled an exterior fence around the jail.

To provide relief, the city will install temporary A/C units starting as early as Monday, Koran Addo, a spokesman for the mayor, said in an email on Saturday.

St. Louis voters in 2015 rejected a bond measure that would have paid for more air conditioning at the jail and other public works projects.

Civil liberties groups have long criticized conditions at the jail, which has a capacity to hold more than 1,100 people. Most of those held are awaiting trial and cannot afford to pay bail required for release.

“The conditions in the St. Louis Jail are a horrific reminder of how dehumanizing our criminal justice system is for everyone involved,” Marbre Stahly-Butts, an advisory committee member of the activist group National Bail Out Fund that lobbied for the change, said in a statement.

The mercury in St. Louis was expected to climb to 104 degrees Fahrenheit (40 degrees Celsius) on Saturday, according to the National Weather Service, which issued heat warnings and advisories for parts of the U.S. Midwest. The heat wave is expected to last through the weekend, said National Weather Service meteorologist Bob Oravec.

Areas of the jail where women and inmates with medical issues are housed do have air conditioning, St. Louis Mayor Lyda Krewson said in a statement. Inmates are relying on cold towels and fans in other areas, she said.

State Senator Jamilah Nasheed, a Democrat from St. Louis, joined the protesters on Friday, according to the St. Louis Post-Dispatch. Protesters chanted “shut it down” outside the jail’s barbed-wire fence, according to video posted to social media.

Representatives for the jail and the city’s police did not return calls seeking comment about the protests.