HELSINKI -- Finland's outgoing prime minister, Sanna Marin, said Wednesday that she will resign as the leader of her Social Democratic Party at the next party congress in the autumn, saying she hopes it will enable her "to open a new page in my own life."

"Now is the time to get in line again and leave the chairman's place," Marin, 37, said during a news conference in Helsinki. She said she would continue as a lawmaker in Parliament.

The Social Democratic Party came in third in Sunday's election, dashing Marin's hopes of staying on as prime minister. Finland's main conservative party claimed victory in an extremely tight three-way race in which right-wing populists took second place.

Marin, who has been prime minister since 2019, is a highly popular figure internationally and at home, but acknowledged that her premiership had put a strain on her personally.

"My endurance has been put to the test," Marin admitted.

She said her Cabinet has gone through some rough periods in the past years and the center-left government has had to resort to difficult decisions. Marin has won praise, among other things, for steering Finland through the COVID-19 pandemic and championing the country's NATO bid together with President Sauli Niinistö, and for being a staunch supporter of Ukraine in its war with Russia.

Her private life and active social media usage have received a lot of international coverage during her premiership. Marin said she hopes to be able to live "a slightly more peaceful life" in the future.

"These have been exceptionally difficult years and difficult times," Marin said, "Now that the election result is like this, I consider that I have the opportunity to open a new page in my own life."

Marin's Cabinet will officially resign on Thursday. Talks to form a new government are to begin next week under the leadership of Petteri Orpo, the head of the National Coalition Party.

The Social Democrats would be open to being a part of the new government, too, Marin said. However, she ruled out the possibility of taking a ministerial post herself. The party congress of the Social Democrats takes place in September.