A high court judge and ardent human rights advocate has been elected Greece’s first female president in a historic vote by parliament.

Inaugurating a new era for one of Europe’s more traditional nations, MPs overwhelmingly endorsed the nomination of Katerina Sakellaropoulou as head of state. No woman has held the post in the nearly 200 years since Greece proclaimed independence. “Today a window to the future has opened,” said the prime minister, Kyriakos Mitsotakis, after 261 deputies in the 300-seat House voted in favour of the French-educated jurist assuming the role. “Our country enters the third decade of the 21st century with more optimism.”

The election – less than a week after the centre-right leader proposed Sakellaropoulou – not only breaks with tradition in an EU state where few women hold political positions but has taken many in Mitsotakis’ own New Democracy party aback.

The 63-year-old, who first made history fifteen months ago when she was elevated to the helm of the highest court in the land by the leftist administration then in power, holds liberal views with an emphasis on environmental protection. But with no known party allegiance she is a political outsider.

The diminutive Sakellaropoulou cut a defiantly modernist figure as she officially accepted her appointment by a cross-party group of mostly male MPs headed by the president of the parliament in her office on Wednesday. Signalling her determination to act as a moral compass in a society often riven by political division, and singling out the climate emergency among the global challenges facing the country, she told the delegation: “I look forward to a society which respects rights … heals the wounds of the past and looks with optimism at the future.”

Her election was immediately applauded by the EU commission chief, Ursula von der Leyen, in a tweet praising Greece for “moving ahead into a new era of equality”.

An expert in environmental and constitutional law, Sakellaropoulou will take the oath of office on 13 March, when she will formally succeed Prokopis Pavlopoulos, a former conservative minister who has held the largely ceremonial position for the past five years.

Raised in Thessaloniki, Greece’s northern metropolis, she is the daughter of a supreme court judge and lives in a part of central Athens eschewed by most politicians.

Worldly and well read, her career has been defined at the vanguard of a minority of jurists unafraid to clash with prevailing sentiment in pursuit of the rule of law. Despite nationalist frenzy two decades ago she stood her ground as a leading proponent of removing religious affiliation from civilian identity cards, a reform demanded by the EU but vigorously opposed at the time by conservatives and the country’s powerful Orthodox church. In a nation on the forefront of the refugee crisis, Sakellaropoulou has also supported citizenship being granted to migrant children.

As Greece enters 2020 after a decade of battling its worst economic crisis in modern times, the appointment of a woman to the country’s highest office has raised hopes that a new page is finally being turned.

Greek female MPs voiced optimism that the president-elect could serve as a role model to younger generations in a nation still getting to grips with the idea of gender equality.

A mere five women currently hold cabinet positions – a scarcity that earned Mitsotakis wide criticism when his government assumed power in July.

Despite protests from some in the opposition that Sakellaropoulou lacked political clout, the rare consensus with which MPs supported her nomination in the first round of what could have been a five-round vote buttressed optimism on Wednesday.

In the past the failure of parliament to elect a president had frequently fuelled dissent, triggering early elections that have spurred further political tumult.