The Catalan parliament has elected the separatist lawmaker Quim Torra as regional president, giving fresh impetus to attempts to split from Spain.
The vote Monday ends five months of political deadlock and makes Torra the seventh Catalan leader since Spain returned to a democracy in the 1970s.
Torra narrowly won the vote 66 to 65 with 4 abstentions, highlighting the parliament's divided nature.
Speaking at the Monday morning debate before the vote, Torra attempted to distance himself from the image of a radical separatist.
"With a republic, everyone will win rights, nobody will lose rights: these are for everyone, no matter which way they vote. The Catalan republic is equality, liberty and fraternity," said Torra according to the Spanish media outlet El Pais.
However, as recently as Saturday, Torra said in a speech that he wanted to build a country with "the maximum radicalism possible."
The election ends a period of direct rule from Madrid that was put in place last October, following a failed attempt at independence by the then Catalan government.
Torra was handpicked as a candidate by his mentor and the former leader of the Catalan parliament, Carles Puigdemont. It is thought Puigdemont will now hold a role as an unofficial advisor.