After Stalin's death in 1953, the Soviet Union pursued a programme of destalinization that was inimical to Rákosi, leading to his deposition. The following political cooling saw the ascent of Imre Nagy to the premiership and the growing interest of students and intellectuals in political life. Nagy promised market liberalization and political openness, while Rákosi opposed both vigorously. Rákosi eventually managed to discredit Nagy and replace him with the more hard-line Ernő Gerő. Hungary joined the Warsaw Pact in May 1955, as societal dissatisfaction with the regime swelled. Following the firing on peaceful demonstrations by Soviet soldiers and secret police, and rallies throughout the country on 23 October 1956, protesters took to the streets in Budapest, initiating the 1956 Revolution. In an effort to quell the chaos, Nagy returned as premier, promised free elections, and took Hungary out of the Warsaw Pact.