The cells were built in 1938 for the republican forces fighting General Franco's Fascist Nationalist army, who eventually won power, historian Jose Milicua told the Spanish newspaper El Pais.
Milicua told the paper he had found court papers from the 1939 trial of French anarchist Alphonse Laurencic, a republican, by a Franco-ist military court.
During the trial Laurencic revealed he was inspired by modern artists, such as surrealist Salvador Dali and Bauhaus artist Wassily Kandinsky, to create the torture cells, said Milicua.
Lighting effects
Laurencic told the court the cells, in Barcelona, featured sloping beds at a 20-degree angle that were almost impossible to sleep on.
They also had irregularly shaped bricks on the floor that prevented prisoners from walking backwards or forwards, the trial papers said.
The walls in the 6ftx3ft cells were covered in surrealist patterns designed to make prisoners distressed and confused, the report continued, and lighting effects were used to make the artwork even more dizzying.
Some of them had a stone seat designed to make occupants instantly slide to the floor, while other cells were painted in tar and became stiflingly hot in the summer, said Laurencic.
Laurencic told the court the cells were built after he heard reports of similar structures being built elsewhere in Spain.
Cut eyeball
The cells were reportedly hidden from journalists who visited the Republicans' jails in Barcelona's Vallmajor and Saragossa streets.
Milicua said there was also evidence that Nationalist prisoners in Murcia were forced to watch Salvador Dali and Luis Bunuel's film Un Chien Andalou.
The surrealist movie features a graphic sequence of an eyeball being cut open.
Modern art had been criticised as being "degenerative" by the Nazi regime, the backers of General Franco.