Spanish Socialist Party (PSOE) leader Pedro Sanchez on Wednesday was sworn in as the country’s prime minister a day after his proposed coalition with a left-wing party narrowly slipped through a vote in Parliament.

Sanchez decided to forgo religious symbolism and took an oath over the Constitution on the presence of King Felipe VI, the head of state. It is the second time in less than two years that the socialist leader has been sworn-in as prime minister, Efe news reported.

After the brief ceremony, the king joked that the process had been “quick, simple and painless,”

“The pain comes later.” It prompted a laugh from Sanchez”, he added.

Lawmakers backed the PSOE’s proposed coalition government with Unidas Podemos (“United We Can”) 167-165 on Tuesday, bringing an end to eight months of political stalemate in the chamber on the back of two inconclusive general elections.

However, the pact required the abstention of two separatist parties, the Catalan ERC and the Basque EH-Bildu, an arrangement that ired the countries main right-wing opposition parties.

Sanchez said he would reveal the new cabinet in the coming week.

He first became PM in June 2018 and led a minority government but was forced to call a snap election for April the following year when he failed to pass the State Budget.

The PSOE emerged the largest party in that vote but fell short of a majority.

As acting PM A repeat general election in November failed to overturn the hung parliament but saw a meteoric rise in the far-right, which prompted Sanchez to sidle up to Pablo Iglesias, the leftist leader of Podemos.

In October, PM Sanchez said that his government was working to ensure that laws were “upheld inside and outside” Spain’s borders.

PM Sanchez also spoke to the media in Brussels on the same day that a strike was held in Catalonia to protest against the prison sentences given to 13 Catalan political and social leaders on Monday for their roles in the independence referendum held in the region in 2017, which was declared illegal by the Spanish Constitutional Court.

In 2017, police and protesters clashed when Catalonia’s pro-independence leaders went ahead with a referendum ruled illegal by Spain’s constitutional court.

In September, a march in Barcelona in support of Catalonia’s independence from Spain drew crowds of about 600,000 people – one of the lowest turnouts in the eight-year history of the annual rally.

(With inputs from agency)