MADRID (Reuters) - Spain’s Socialists said on Saturday they were confident of reaching a government agreement with the far-left Podemos party that would pave the way for acting Prime Minister Pedro Sanchez to be sworn in by parliament next week.

FILE PHOTO: Spain's acting Prime Minister Pedro Sanchez speaks with Unidas Podemos' (Together We Can) leader Pablo Iglesias during their meeting at the Moncloa Palace in Madrid, Spain, May 7, 2019. REUTERS/Juan Medina

Socialist leader Sanchez, who won the most seats but fell short of a majority in a parliamentary election in April, hopes to be sworn in as prime minister but even with Podemos’s support he will still need some extra votes from other parties.

After days of increasing confrontation and stalled power-sharing talks, negotiations between the Socialists and Podemos reached a turning point on Friday after the far-left party’s leader, Pablo Iglesias, said he was willing to give up having a post in a coalition government, accepting a key condition of Sanchez.

“Now I am convinced that there will be an agreement. The party is (too),” Socialist Party deputy secretary general Adriana Lastra told reporters in Oviedo, northern Spain.

“That’s what we are going to be working on in the next hours, days ... with the goal that this country next week will have a fully functioning government,” she added.

An alliance of the Socialists with Podemos, their most natural political ally, would bring Sanchez almost within touching distance of the parliamentary majority he needs.

A parliamentary debate starts on Monday ahead of the first confirmation vote, scheduled for around 1800 (1600 GMT) on Tuesday.

To be sworn in again as prime minister, Sanchez needs to win an absolute majority or at least 176 votes.

If that fails, within two days he must seek a simple majority - where more lawmakers back him than oppose him or abstain - to be able to form the next government.

If he loses that vote, a two-month countdown will begin until a new election is held.

Podemos wants some key ministerial portfolios in any coalition government, but Sanchez has offered only lower-ranking posts, although he has opened the door to accept Podemos members in a coalition government.