Spain's rightwing opposition leader Alberto Nunez Feijoo on Tuesday launched a likely fruitless bid to form a government following an election in which no party won a majority.

Feijoo's People's Party (PP) won the most seats in July's election but has so far failed to cobble together enough votes for a parliamentary majority despite support from the hard right Vox party.

Debating will begin on Tuesday, with a vote requiring an absolute majority to come on Wednesday. Feijoo will get a second vote on Friday, which only requires a simple majority.

If, as expected, Feijoo fails, acting Prime Minister Pedro Sanchez, who leads the Spanish Socialist Workers Party (PSOE), will have two months from Wednesday to make his bid before parliament is dissolved and fresh elections are called.

With his chances of forming a government slim, Feijoo will probably use the debate to attack Sanchez, who has a more realistic chance but only with the support of the hardline Junts, who seek a controversial amnesty for pro-independence leaders and activists involved in a 2017 attempt to separate Catalonia from Spain.

With the support of Vox (33 seats) and regional parties Union of the Navarran People (1 seat) and Canarian Coalition (1 seat), PP (137 seats) have 172 votes, four short of a majority in the 350-seat chamber.

Other smaller parties have refused to lend their votes, saying they would not want to facilitate a coalition featuring a far right party.

"Feijoo might be in search of divine intervention, since it is the only thing that would give him a chance of winning tomorrow’s vote, and becoming prime minister," Eurointelligence said in a briefing on Tuesday.

The PSOE can probably count on 171 seats with the support of the far-left Sumar party, the Catalan pro-independence party Esquerra, the Basque separatists EH Bildu, the Basque Nationalist Party and the Galician Nationalist Bloc.

The seven votes from the Junts would therefore be enough to achieve a majority.

A PP source said Feijoo in his speech on Tuesday will outline policy proposals he would carry out as prime minister, including lowering taxes for entrepreneurs and low- and middle-income earners and devising a plan to capture foreign investment.

He will also propose the introduction of a bill to make "institutional disloyalty" a crime after Sanchez last year struck down a sedition law. (Reporting by Belen Carreno and Emma Pinedo; Writing by Charlie Devereux; Editing by Bernadette Baum)