After the quick defeat of the Royal Yugoslav Army, Rupnik was released from German military prison and moved to the Italian-occupied southern Slovenia (known as Province of Ljubljana) on April 17, 1941.
On June 7, 1942, he accepted the position of President of the Provincial Council of Ljubljana, thus replacing Juro Adlešič as mayor under Italian occupation.
After the Italian armistice in September 1943, Ljubljana was occupied by the Germans.
Friedrich Rainer, Nazi Gauleiter of Carinthia, nominated Rupnik as president of the new provincial government, after a consultation with bishop Gregorij Rožman who agreed with Rainer's intention to put Rupnik in charge of the provisional government.
Bishop Rožman praised Rupnik highly, stating he was "the most capable man for this administrative position".

Friedrich Rainer also proposed the creation of the Home Guard, which functioned under the command of SS Lieutenant-General, Erwin Rösener, who in turn reported directly to SS Chief, Heinrich Himmler.
Together with Anton Kokalj, Ernest Peterlin and Janko Kregar, Rupnik was also one of the founders of the Slovene Home Guard, an auxiliary military unit of the SS, formed as a voluntary militia to fight the partisan resistance movement.
The militia was organized mostly by members of Slovene anti-Communist politicians gathered around the underground organization Slovenian Covenant (Slovene: Slovenska zaveza) in agreement with the German occupation forces.
Soon after the formation of the militia on September 23, 1943, Rupnik nominated himself its commander-in-chief.

In his first order to the Home Guard on September 30, Rupnik proclaimed, "whoever is not directly tied to cooperation with the German Army or the police is an armed bandit, and must be attacked and destroyed without delay", urging his men to handover captured partisans to the closest German army or police garrison.
He was dismissed by Rainer on November 4, 1943.
In September 1944, he was nominated chief inspector of the Slovene Home Guard, a function with virtually no competence.

In his function of president of the provincial administration, Rupnik organized a large-scale bureaucracy which tried to cover all spheres of civilian life, from local administration, to social security and cultural policies.
For this purpose, he relied on two groups of aides: on one side, mostly apolitical civil servants and cultural functionaries active already in the Kingdom of Yugoslavia (such as Stanko Majcen and Narte Velikonja); on the other side, he involved several highly ideological and fervently pro-Nazi young individuals, such as Ljenko Urbančič and son-in-law Stanko Kociper.
Rupnik succeeded in keeping almost all Slovene cultural and educational institutions functioning under Nazi occupation, and in 1944 he even managed to rename the "Academy of Sciences and Arts in Ljubljana" to Slovenian Academy of Sciences and Arts.

Throughout his presidency, Rupnik maintained complete loyalty to the German Nazi occupation authorities.
In 1944, while Rupnik served as president of the Ljubljana provincial administration, the Slovene Home Guard Police arrested the remaining Jews, who until then had managed to hide in the city, and turned them over to the Nazi authorities, who sent them to Auschwitz and other concentration camps.
He organized several "anti-Communist rallies", in which he delivered violent speeches against the Liberation Front of the Slovenian People, the Western Allies and the "World Jewish Conspiracy".
He maintained friendly contacts with the SS general Erwin Rösener, who was later convicted of war crimes.

As Chief Inspector of the Slovenian Home Guard, Rupnik led the Home Guards in two oaths of allegiance - the first on Hitler’s birthday on April 20, 1944, then on the 12th anniversary of the Nazis coming to power, on January 30, 1945.
In the oaths the Home Guards swore to fight together with the SS and German police under the leadership of the Führer against the Communist guerillas and their allies.
Rupnik disagreed with all attempts by members of the Slovenian Covenant and some milita
After the quick defeat of the Royal Yugoslav Army, Rupnik was released from German military prison and moved to the Italian-occupied southern Slovenia (known as Province of Ljubljana) on April 17, 1941. On June 7, 1942, he accepted the position of President of the Provincial Council of Ljubljana, thus replacing Juro Adlešič as mayor under Italian occupation. After the Italian armistice in September 1943, Ljubljana was occupied by the Germans. Friedrich Rainer, Nazi Gauleiter of Carinthia, nominated Rupnik as president of the new provincial government, after a consultation with bishop Gregorij Rožman who agreed with Rainer's intention to put Rupnik in charge of the provisional government. Bishop Rožman praised Rupnik highly, stating he was "the most capable man for this administrative position".
Friedrich Rainer also proposed the creation of the Home Guard, which functioned under the command of SS Lieutenant-General, Erwin Rösener, who in turn reported directly to SS Chief, Heinrich Himmler. Together with Anton Kokalj, Ernest Peterlin and Janko Kregar, Rupnik was also one of the founders of the Slovene Home Guard, an auxiliary military unit of the SS, formed as a voluntary militia to fight the partisan resistance movement. The militia was organized mostly by members of Slovene anti-Communist politicians gathered around the underground organization Slovenian Covenant (Slovene: Slovenska zaveza) in agreement with the German occupation forces. Soon after the formation of the militia on September 23, 1943, Rupnik nominated himself its commander-in-chief.
In his first order to the Home Guard on September 30, Rupnik proclaimed, "whoever is not directly tied to cooperation with the German Army or the police is an armed bandit, and must be attacked and destroyed without delay", urging his men to handover captured partisans to the closest German army or police garrison. He was dismissed by Rainer on November 4, 1943. In September 1944, he was nominated chief inspector of the Slovene Home Guard, a function with virtually no competence.
In his function of president of the provincial administration, Rupnik organized a large-scale bureaucracy which tried to cover all spheres of civilian life, from local administration, to social security and cultural policies. For this purpose, he relied on two groups of aides: on one side, mostly apolitical civil servants and cultural functionaries active already in the Kingdom of Yugoslavia (such as Stanko Majcen and Narte Velikonja); on the other side, he involved several highly ideological and fervently pro-Nazi young individuals, such as Ljenko Urbančič and son-in-law Stanko Kociper. Rupnik succeeded in keeping almost all Slovene cultural and educational institutions functioning under Nazi occupation, and in 1944 he even managed to rename the "Academy of Sciences and Arts in Ljubljana" to Slovenian Academy of Sciences and Arts.
Throughout his presidency, Rupnik maintained complete loyalty to the German Nazi occupation authorities. In 1944, while Rupnik served as president of the Ljubljana provincial administration, the Slovene Home Guard Police arrested the remaining Jews, who until then had managed to hide in the city, and turned them over to the Nazi authorities, who sent them to Auschwitz and other concentration camps. He organized several "anti-Communist rallies", in which he delivered violent speeches against the Liberation Front of the Slovenian People, the Western Allies and the "World Jewish Conspiracy". He maintained friendly contacts with the SS general Erwin Rösener, who was later convicted of war crimes.
As Chief Inspector of the Slovenian Home Guard, Rupnik led the Home Guards in two oaths of allegiance - the first on Hitler’s birthday on April 20, 1944, then on the 12th anniversary of the Nazis coming to power, on January 30, 1945. In the oaths the Home Guards swore to fight together with the SS and German police under the leadership of the Führer against the Communist guerillas and their allies. Rupnik disagreed with all attempts by members of the Slovenian Covenant and some milita
Leon Rupnik