By Julien Toyer and Carlos Ruano
MADRID (Reuters) - Spain's acting Prime Minister Mariano Rajoy said on Thursday he had accepted a mandate from the King to form a government although he warned he might fail and left open the date for a potential confidence vote in parliament.
Rajoy said he would now open a round of talks with other parties to try to convince them to vote for his conservative People's Party.
Most of them declined to support plans for a conservative-led government in talks with the King on Thursday and earlier this week, however, leaving the PP with just 137 votes in parliament when 176 are needed to secure a majority.
"Spain needs a government now, this government should be headed by the PP and there is no alternative to this," Rajoy told a news conference after meeting with King Felipe.
"I will try to form this government but not everything depends on me."
National elections in December and June both resulted in hung parliaments, forcing the parties to try to negotiate their way to a viable coalition -- so far without success, despite four rounds of formal consultations with the king.
Insiders were hoping a deadline to pass a budget for 2017 by the end of September will concentrate minds.
But the left-leaning parties, the second-placed Socialists and Unidos Podemos ("Together We Can"), reiterated after the talks with the King that they would oppose Rajoy.
Liberal party Ciudadanos ("Citizens"), which came fourth in the June 26 election, said it would abstain in a confidence vote.
"We want to change Rajoy's government and this is why we will vote 'no' in a confidence vote," Socialist leader Pedro Sanchez told journalists.
Without backing or at least an abstention from the Socialists, Rajoy would find it almost impossible to secure a majority for a second term in office.
The conservative PP was the only one of the four main parties to win more seats in June than in December and Rajoy said that if he failed to win a stable majority, he would seek to run a minority government.
This would require other parties to initially abstain in a confidence vote and then each law would have to be negotiated on a case by case basis, starting with next year's budget, which must be passed in time for an EU deadline in October.
"This period should not drag on in such a way that we would not be able to fulfill our European commitments, such as the spending limit, the deficit target and the budget," Rajoy said.
"Before mid-October, this should be sent to Europe,"
(Additional reporting by Sarah White; Editing by Catherine Evans)