the Russian Revolution, North Ossetia became part of the short-lived Soviet Mountain Republic in 1921. It became the North Ossetian Autonomous Oblast on July 7, 1924 and was then made the North Ossetian Autonomous Soviet Socialist Republic (ASSR), within the Russian Soviet Federated Socialist Republic, on December 5, 1936. In World War II, North Ossetia saw the high-water mark of the invasion of Russia by Nazi Germany; the Germans attempted to seize Vladikavkaz in November 1942 but were repulsed. During and after the war Stalin undertook massive deportations of whole ethnicities explaining this by anti-Sovietism, separatism and collaboration with Nazi Germany. In particular, this affected Balkars, Chechens, and Ingushs. As of 1944, the part of the Prigorodny District on the right bank of the Terek River had been part of Chechen-Ingush ASSR, but it was granted to North Ossetia in following Joseph Stalin's deportation of the Chechens and Ingush to Central Asia. Although they were eventually allowed to return from the exile, they were generally not allowed to settle in the original territories. Instead, in 1957, three districts of Stavropol Krai were granted to Chechen-Ingush ASSR. A local law passed in 1982 actually prohibited ethnic Ingush from obtaining residency permits in North Ossetia. After the USSR North Ossetian SSR finally became the first autonomous republic of the RSFSR to declare national sovereignty, on June 20, 1990 (although it still remains firmly part of Russia). In 1991, North Ossetian SSR was renamed the Republic of North Ossetia–Alania. The dissolution of the Soviet Union posed particular problems for the Ossetian people, which were divided between North Ossetia, which was part of the Russian SFSR, and South Ossetia, part of the Georgian SSR. In December 1990 the Supreme Soviet of Georgia abolished the autonomous Ossetian enclave amid the rising ethnic tensions in the region, and much of the population fled across the border to North Ossetia or Georgia proper. Some 70,000 South Ossetian refugees were resettled in North Ossetia, sparking clashes with the predominantly Ingush population in the Prigorodny District. That led to Ossetian-Ingush conflict. As well as dealing with the effects of the conflict in South Ossetia, North Ossetia has had to deal with refugees and the occasional spillover of fighting from the war in neighboring Chechnya. The bloodiest incident by far was the September 2004 Beslan hostage crisis, in which Muslim separatists of Shamil Basayev seized control of a school. In