This former prison for misbehaving students sits in the basement of the Biblioteca Joanina. Originally located beneath the Sala dos Capelos, it was later transferred back to the medieval jail beneath the library (incredibly, the university was able to operate its own separate laws). In 1834, after the liberal revolution in Portugal, the prison was used as a deposit for books and illuminated manuscripts from convents and monasteries.
Access to the prison is included in visits to the Biblioteca.