Jaruzelski became the First Secretary of the Polish United Workers' Party and leader of Poland after the brief one-year term of Stanisław Kania. Kania's predecessor, Edward Gierek, left Poland severely indebted by accepting loans from foreign creditors and the country's economy almost collapsed by the time Jaruzelski became head of state. As Poland headed towards insolvency, rationing was enforced due to shortages of basic goods, which only contributed to the tense social and political situation. The declining living and working conditions triggered anger among the masses and strengthened anti-communist sentiment; the Solidarity movement was also gaining support which worried the Polish Central Committee and the Soviet Union that viewed Solidarity as a threat to the Warsaw Pact. Fearing a Soviet intervention similar to those in Hungary (1956) and Czechoslovakia (1968), Jaruzelski imposed martial law in Poland on 13 December 1981 to crush the anticommunist opposition. The military junta, curfew and travel restrictions lasted until 22 July 1983.