In 1938, he was elected Member of the Parliament of the Kingdom of Yugoslavia on the list of the Yugoslav Radical Community, of which the Slovene People's Party was part between 1935 and 1941.
After the death of Anton Korošec, Krek became General Secretary of the Yugoslav Radical Community in the Drava Banovina, and thus the second most influential politician in the Slovene People's Party after Fran Kulovec.
After the Axis invasion of Yugoslavia in April 1941, Krek emigrated to Palestine and then to London, as a member of the Yugoslav Government in Exile, led by Dušan Simović.
Together with fellow party member Franc Snoj, Krek became the Slovene representative the Yugoslav exile governments of Slobodan Jovanović and Miloš Trifunović.
[5] In 1946, Krek was tried in absentia by the new Yugoslav Communist authorities on charges of high treason and war crimes and sentenced to 15 years of prison.
He stayed in Rome until 1947, where he organized, together with Ivan Ahčin, a network that helped in the emigration of tens and thousands of Slovenes[citation needed], especially to Argentina and to the United States.