Spain's caretaker socialist prime minister Pedro Sanchez has lost a crunch post-election vote of confidence after coalition talks with the far-left failed.

Mr Sanchez faced the confidence vote in parliament after his Socialist party won most seats in an inconclusive general election in April without securing a majority.

Today, apart from the 123 lawmakers of his own party, just one other deputy from a regional grouping supported Mr Sanchez in the vote, leaving him far from the simple majority he needed to go through.

This moves Spain a step closer to holding its fourth general election in as many years.

The country faces several challenges: an ongoing separatist movement in the northeastern region of Catalonia, high unemployment, low wages and job insecurity.

Mr Sanchez now has another two months to find ways of getting support, either for a minority or coalition government.

Without a deal Spain would have to go back to the polls in November.

Pablo Iglesias, leader of Spanish left-wing party Podemos

Representatives from the socialists and the far-left Podemos party had been working to secure a deal for what would have been Spain's first post-dictatorship coalition government. But talks stalled yesterday evening.

Today, Deputy Prime Minister Carmen Calvo, who led the socialist's negotiations, said Podemos's demands for government posts were "unrealistic," accusing the far-left party of wanting "a parallel government" of its own.

Podemos leader Pablo Iglesias "wanted to enter government to control the government," Mr Sanchez told parliament, despite coming fourth in the April poll.

He said Podemos's proposal entailed "controlling 80% of government expenditure."

Mr Iglesias said Mr Sanchez had done little to negotiate a government since the April general poll.

"It's very difficult to negotiate in 48 hours what you didn't want to negotiate in 80 days," he said.

Both sides had agreed to give Podemos the post of deputy prime minister with responsibility for social issues and the health ministry.

But Podemos also wanted the science and labour ministries, which the Socialist party refused, preferring to give it the housing and equality ministries.

Gabriel Rufian, Catalan separatist ERC party leader in parliament, criticised both sides for failing to reach an agreement and said Mr Sanchez and Mr Iglesias would "regret it."