First President of Finland
Ståhlberg emerged as a candidate for president, with the support of the newly formed National Progressive Party, of which he was a member, and the Agrarian League. In the 1919 Finnish presidential election, he was elected by Parliament as President of the Republic on 25 July 1919, defeating Carl Gustaf Mannerheim (the candidate supported by the National Coalition and Swedish People's parties) by 143 votes to 50.
Ståhlberg was inaugurated as the first President of the Republic on the following day, and reluctantly moved out of his home in Helsinki to take up residence in the Presidential Palace.
Ståhlberg had been a widower since 1917, but in 1920, as president, he married his second wife, Ester Hällström (1870–1950). He was also very formal and, due to his shyness, wrote everything he had to say in public beforehand. Ståhlberg also had a distaste for official occasions, and he did not like travel or state visits, which is why, despite invitations and exhortations, he made no visits abroad during his presidency and received only one guest, Estonian President Konstantin Päts in May 1922. The Estonian head of state's visit was the first official visit to independent Finland. Finland's Ambassador to Stockholm, Werner Söderhjelm, repeatedly offered Ståhlberg a visit to its western neighbor Sweden, but Ståhlberg maintained his position:"Let my followers then travel as much as they want."The first official visit of the President of Finland abroad was made only by his successor, President L. K. Relander.
As the first President of the Republic, Ståhlberg had to form various presidential precedents and interpretations of how the office of President should be conducted. His term in office was also marked by a succession of short-lived governments. During his time as president, Ståhlberg nominated and appointed eight governments. These were mostly coalitions of the Agrarians and the National Progressive, National Coalition and Swedish People's parties, although Ståhlberg also appointed two caretaker governments. Importantly, Ståhlberg generally supported all the governments that he nominated, although he also sometimes disagreed with them.
He forced Kyösti Kallio's first government to resign in January 1924, when he demanded early elections to restore the full membership of Parliament – 200 deputies – and Kallio disagreed. The Parliament had lacked 27 deputies since August 1923, when the Communist deputies had been arrested on suspicions of treason.
Ståhlberg supported moderate social and economic reforms to make even the former Reds accept the democratic republic. He pardoned
most of the Red prisoners, despite the strong criticism that this aroused from many right-wing Finns, especially the White veterans
of the Civil War and several senior army officers. He signed into law bills that gave the trade unions an equal power with the employers' organizations to negotiate labour contracts, a bill to improve the public care for the poor, and the Lex Kallio law which distributed land from the wealthy landowners to the former tenant farmers and other landless rural people.
In foreign policy Ståhlberg was markedly reserved towards Sweden, largely as a consequence of the Åland crisis, which marked the early years of his presidency. He was also cautious towards Germany, and generally unsuccessful in his attempts to establish closer contacts with Poland, the United Kingdom and France.