BARCELONA — The regional parliament of Catalonia voted on Sunday the investiture of the president of Spain’s northeastern region as a result of a last-minute agreement that avoided calling for early elections on Monday.

The new president of the regional government of Catalonia, Carles Puigdemont, is a former journalist and the mayor of the city of Girona and will be leading the process of the region’s independence from Spain within 18 months, as according to the plan.

Spain’s acting Prime Minister Mariano Rajoy, who has always said that the process breached the Spanish constitution, said on Sunday he had given instructions to confront any act in Catalonia that breached the constitution.

The government will not allow any act against the law or decisions of courts, he said.

Puigdemont had the support of his political party, Junts pel Si (Together for Yes) and eight of the 10 members of the anti-capitalist party CUP (Popular Unity Candidacy) resulting in 70 votes in favor, 63 against and two abstentions.

Puigdemont said his government will have to “negotiate with the Spanish State” and European authorities about the independence of Catalonia, a goal that he said was inalienable.

The former president of Catalonia, Artur Mas, stepped aside as his investiture as president was regarded as the main problem to reach an agreement between Junts pel Si and CUP to reach a pro-independence majority.

The agreement avoided call for early elections on Monday as Mas said on Tuesday he would call for early elections if an agreement to form a government was not reached before Sunday.

After the elections on Sept. 27, Junts pel Si (Together for Yes), a joint list of Mas political party CDC and left-wing ERC and other groups supporting independence, won the elections but failed to reach a majority needing the CUP’s support. PNA/Xinhua /