In 1968, after the unsuccessful Czechoslovak attempt to liberalise the Communist regime, the city was occupied by Warsaw Pact troops. Shortly thereafter, it became capital of the Slovak Socialist Republic, one of the two states of the federalized Czechoslovakia.