After World War I and the dissolution of Austria-Hungary, the territory of Eastern Galicia (Halychyna), populated by a Ukrainian majority but with a large Polish minority, was incorporated into Poland following the Polish–Ukrainian War. Between the wars, the political allegiances of Ukrainians in eastern Galicia were divided between moderate national democrats and the more radical Organization of Ukrainian Nationalists. The latter group itself splintered into two factions, the more moderate OUN-M led by Andriy Melnyk with close ties to German intelligence (Abwehr), and the more radical OUN-B led by Stepan Bandera. When Poland was divided between Germany and the Soviet Union under the terms of the Molotov–Ribbentrop Pact in 1939, the territory of eastern Galicia was annexed to Soviet Ukraine. In 1941 it was occupied by Germany.