The first elements of the Underground State were established in the final days of the German and Soviet invasion of Poland, in late September 1939. The Underground State was perceived by supporters as a legal continuation of the pre-war Republic of Poland (and its institutions) that waged an armed struggle against the country's occupying powers: Nazi Germany and the Soviet Union. The Underground State encompassed not only military resistance, one of the largest in the world,[b] but also civilian structures, such as education, culture and social services.