Greece achieved its independence from the Ottoman Empire in 1829. During the second half of the 19th century and the first half of the 20th century, it gradually added neighboring islands and territories, most with Greek-speaking populations. Following the defeat of Communist rebels in 1949, Greece joined NATO in 1952. A military dictatorship, which in 1967 suspended many political liberties and forced the king to flee the country, lasted seven years. Democratic elections in 1974 and a referendum created a parliamentary republic and abolished the monarchy; Greece joined the European Community or EC in 1981 (which became the EU in 1992). The economic progress of modern Greece has been very uneven, with few periods of sustained growth. Despite periodic modernization programs that began in the late nineteenth century, until the middle of the following century Greece remained predominantly an agricultural nation. Then, following the destruction of much of its infrastructure in World War II and the Civil War of 1946-49, the Greek economy grew, with substantial Western aid, at a phenomenal rate in the 1950s and the 1960s. An important aspect of this growth was the development of the industrial sector into a significant part of the national economy, which was bolstered by a number of large investment projects backed by West European nations. The most important elements of this growth were the shipping, chemical, pharmaceuticals, metallurgy, and electrical machinery industries. By the early 1970s, however, a major economic crisis developed. Caused by the inept economic policies of the military regime, an international fuel crisis, and excessive borrowing in the public sector, the crisis brought production growth in many parts of the economy to a standstill for the next fifteen years. Budget deficits and inflation climbed in the 1980s, bringing a series of stabilization policies that included tax reform and privatization of state enterprises.