After nearly a year of political uncertainty in Spain, Socialist leader Pedro Sanchez was chosen by parliament to form a government. Sanchez won the vote by a razor-thin margin of 167 in favor versus 165 against, after losing a first vote on Saturday.

Sanchez initially became prime minister in June 2018, when his predecessor Mariano Rajoy lost a confidence vote in the midst of a political crisis with Catalonia, whose government has been seeking independence from Madrid. Sanchez had vowed to reestablish dialogue with Catalan leaders after Rajoy's crackdown on the independence movement.

However, Sanchez's government struggled to get legislation passed, and in early 2019, the prime minister called an early election after his proposed budget was rejected. Inconclusive elections in both April and November left his socialists in first place but without enough seats in parliament to form a government.

In response, Sanchez's second government will be a coalition with far-left party Podemos, although he had previously said he could not countenance an alliance with them.

'No other option'

This is the first coalition government since the end of the dictatorship of Francisco Franco in 1975. The Socialists and Podemos will also be a minority government, with only 155 seats in a parliament of 350 members.

Sanchez has said that there was "no other option" but to form an alliance.

"Without an elected government and parliament, it is obvious that our democracy suffers," he said.

Together, their program includes an increase in the minimum wage, increased taxes on the wealthy and big business, and the repeal of a controversial 2012 labor reform that makes it easier for companies to fire employees.

The deal will also see Sanchez open an official dialogue with Catalan leaders on the future of the wealthy region, and then put any proposed plan to a regional vote.

es/msh (AFP, AP)