The acting prime minister needs the support of Catalan and Basque groups to form a socialist-led government.

Spain’s acting Prime Minister Pedro Sanchez has said he will meet the leftist Unidas Podemos movement, as well as regional parties including Catalan separatists, in a bid to strike a deal on forming a government and avoiding snap elections.

Last month, Sanchez, whose Socialist Party finished first in an inconclusive national election in April, twice failed to garner a parliamentary majority in support of his administration after talks to form a coalition government with Podemos collapsed.

“At the end of August or beginning of September, we will be meeting with different political forces that could be open to supporting a confirmation of the Socialists [in office],” Sanchez told journalists.

He has previously ruled out making another attempt to form a coalition with Podemos and would in any case also need the cooperation of other parties in order to govern.

Sanchez has spent this week meeting with unions, business associations, environmentalists and cultural groups in hopes of garnering support for a third parliamentary vote.

On Friday, he named the Catalan and Basque nationalists among the parties he hoped would support him this time.

He has until late September to be confirmed as prime minister or put forward another candidate for the job.

Failing that, a new election would be called for November 10.