Strong grassroots movements sprang up in Sweden during the latter half of the 19th century (trade unions, temperance groups, and independent religious groups), creating a strong foundation of democratic principles. In 1889 The Swedish Social Democratic Party was founded. These movements precipitated Sweden's migration into a modern parliamentary democracy, achieved by the time of World War I. As the Industrial Revolution progressed during the 20th century, people gradually moved into cities to work in factories and became involved in socialist unions. A communist revolution was avoided in 1917, following the re-introduction of parliamentarism, and the country was democratised.