Spanish conservative leader Alberto Nunez Feijo failed today to secure enough votes in the lower house to become prime minister.

Feijo, whose People’s Party won the most seats in July’s inconclusive parliamentary elections, failed to convince enough lawmakers from other parties to back him to secure an outright majority.

Feijo received 172 votes in favor while 178 MPs voted against and there were no abstentions out of a total of 350. Spanish law allows Feijo a second attempt the day after Friday, so a simple majority would be enough to be elected prime minister.

While Feijo has taken the first stab at trying to form a government, it is caretaker Prime Minister Pedro Sanchez who has a more realistic — if difficult — chance of convincing lawmakers in parliament to back him for another term.

Feijo told reporters after the vote: “It is clear that we did everything we could, and that Spain can rest easy because we will continue to work on this.”

If Feijo fails on Friday, Sanchez will have to negotiate with pro-independence Catalan parties demanding a controversial and unpopular amnesty for leaders and activists involved in the region’s 2017 secession from Spain as condition for their support.

Sanchez will have two months to negotiate a deal and, if he fails, new elections will be held.