Socialist leader Pedro Sanchez has become Spain’s seventh prime minister after a no-confidence vote in parliament unseated Mariano Rajoy’s conservative government.

Sanchez vowed on Friday to address the “social emergencies” of the country’s citizens after years of austerity measures.

The 46-year-old, who is the head of Spain‘s largest opposition party (PSOE), was sworn in by King Felipe VI on Saturday and will appoint his cabinet over the coming days.

For Sanchez, it has been a strange turn of events over the past two years – from losing the leadership of his party to becoming prime minister.

When PSOE lost heavily in the 2015 parliamentary elections and his bid to become prime minister the following year failed, Sanchez’s political future did not look so bright.

However, Sanchez’s political resurrection has been swift since returning as PSOE leader in May 2017.

The passing of the no-confidence vote, which was proposed by Sanchez, means that he leads the government, despite his party having only 84 seats.

In his new role, he will be under pressure to resolve a secession crisis in the Catalonia region, keep a strong economic recovery on track and shield his 139-year-old party from the rise of liberal and leftist opponents Ciudadanos and Podemos.

“I am aware of the responsibility I am assuming, of the complex political moment our country is going through and I will rise to all the challenges with humility and dedication,” Sanchez said after the vote.

Passionately pro-European, Sanchez studied for a masters in economic policy in Brussels and he has worked in the European Parliament and the United Nations.

He has committed to respecting the European Union‘s fiscal rules and has already endorsed Rajoy‘s budget. His weak hand in parliament means he is also unlikely to rescind any of the structural reforms the conservatives passed.

I am aware of the responsibility I am assuming ... and I will rise to all the challenges with humility and dedication Pedro Sanchez

‘Persistent and daring’

Sanchez was first elected as party leader in 2014, coming from the party’s backbenches as a relative unknown.

The economics lecturer, whose nickname is “Pedro el Guapo” [Pedro the beautiful], was expected to use his charisma to lead a new era for the PSOE.

The PSOE has struggled to carve out a role in the new fragmented political landscape that emerged from the worst economic crisis since the Spanish civil war of the 1930s and ended four decades of a stable two-party system.

Sanchez lost two national elections to Rajoy’s People’s Party in 2015 and 2016.

The wounds inside the party have remained profound and Sanchez has relied on the strong support he enjoys from the party’s grassroots rather than its elite, something which could make it harder for him to form a strong government.

His supporters say he has a calm personality and a talent for compromise. Opponents say he lacks charisma and a clear political vision.

The avid athlete and basketball fan is married with two daughters. Spanish newspaper El Pais wrote on Friday about the “miracle of Doctor Sanchez”, characterising him as “persistent and daring”.