During the revolution in 1848–49, Pécs was occupied by Croatian armies for a short time, but it was freed from them by Habsburg armies in January 1849.