After being appointed as a judge in Heinola in 1906, he attempted to keep out of the front line of politics. However he was elected Speaker of the Parliament in 1907, largely because the majority Social Democrats considered him "the best-known opponent of illegality". Svinhufvud's parliamentary opening speeches, in which he laid emphasis on legality, led to the Tsar dissolving Parliament in both 1909 and 1910. He served as Speaker until 1912. Svinhufvud also served as a judge in Lappee 1908–1914.