MADRID (Reuters) - Spain's King Felipe will meet leaders of all the main political parties Oct. 24 and 25 in the latest attempt to pick a candidate to form a government after almost 10 months of political stalemate following two inconclusive elections.

Under Spanish law, the king acts as a formal broker between political parties after elections in December and June which gave no single leader a clear majority.

After the last consultation following the June election, acting Prime Minister Mariano Rajoy was tasked with finding parliamentary support to form a government, but lost two confidence votes in his bid for a second term.

The resignation this month of Socialist party head, Pedro Sanchez, who blocked Rajoy's reelection in previous votes, may prompt the traditional left-wing opposition to abstain in a confidence vote avoiding the need for a third election.

(Reporting by Paul Day; Editing by Sonya Dowsett)