After a brief experimentation with monarchy, when an attempt to make Prince Frederick Charles of Hesse  King of Finland proved to be a poor success, Finland became a presidential republic, with K. J. Ståhlberg elected as its first president in 1919. As a liberal nationalist and with a legal background, Ståhlberg anchored the state in liberal democracy, guarded the fragile shoot of the rule of law, and embarked on internal reforms. Finland was also one of the first European countries to strongly aim for equality for women, with Miina Sillanpää serving in Väinö Tanner's cabinet as the first female minister in Finnish history in 1926–1927. The Finnish–Russian border was defined in 1920 by the Treaty of Tartu, largely following the historic border but granting Pechenga () and its Barents Sea harbour to Finland. Finnish democracy did not experience any Soviet coup attempts and likewise survived the anti-communist Lapua Movement. Nevertheless, the relationship between Finland and the Soviet Union remained tense. Army officers were trained in France, and relations with Western Europe and Sweden were strengthened.