The building of the Ostrava Detention Prison was built together with the Palace of Justice in 1926-1929. Shortly after the occupation, the German court took over the entire 4th floor, and from the summer of 1939, the prison was also used by the German secret state police, known as the Gestapo. The Gestapo eventually occupied the entire 2nd floor.