Spain is set for another election - its fourth in four years.
Acting Prime Minister Pedro Sánchez made the announcement on Tuesday, having failed to secure enough support in parliament to form a government.
King Felipe VI, the head of state, spent two days consulting with rival party leaders, but no consensus could be found on a candidate for prime minister.
The election will take place on 10 November. The last one was in April.
Mr Sánchez's socialist PSOE party gained the most seats in that election, but it fell short of a majority in Spain's 350-seat parliament.
In an evening press conference, Mr Sánchez blamed the opposition for the political deadlock.
"It has been impossible to complete the mandate given to us by the Spanish people on April 28. They [the rival parties] have made it impossible for us," he said.
The acting PM had been seeking to find a political solution for several months.
His preferred partners, the left-wing Podemos party, had already rejected any arrangement short of a formal coalition.
A potential alliance between PSOE and the centre-right Ciudadanos party also fell through.
El País newspaper reported that attempts to reach a deal went up until the last minute.
After the announcement, Podemos leader Pablo Iglesias blamed Mr Sánchez for the impasse, saying he had "arrogance and disdain for the basic rules of parliamentary democracy".