Estonia’s parliament has selected a new president who will be the country’s first female leader.

Kersti Kaljulaid, a European Union accountant, won Monday’s vote 81-0, with 20 members absent or abstaining. Her selection follows two failed votes and weeks of heated debate.

Kaljulaid, 46, will succeed the current president, Toomas Hendrik Ilves, who is stepping down next week after two five-year terms in the ceremonial post.

The choice of Kaljulaid, who works at the European court of auditors, became possible after the six parliamentary parties agreed to propose a political outsider as a single candidate.

Her election came after the failure of an electoral college to choose a president from five candidates last month. Politicians were unable to pick a president from four candidates in August.