There have been several exceptional presidential elections. The first president, Kaarlo Juho Ståhlberg, was chosen by the Finnish parliament due to the transition rule of the constitution and also due to the martial law. In 1940 and 1943, the 1937 electoral college chose the president, as it was felt that a popular election could not be arranged due to the martial law (1940) and the Continuation War (1943). In 1944 special legislation directly stipulated that Marshal Mannerheim be elected president for six years after Risto Ryti had resigned mid-term. In 1946, special legislation empowered the Parliament to choose a successor for the remainder of Mannerheim's term (until 1950), the latter having resigned. Then Prime Minister Juho Kusti Paasikivi was elected president by Parliament. In 1973, special legislation extended President Urho Kekkonen's term by four years until 1978, when he was re-elected regularly.