Acting Prime Minister Mariano Rajoy has dismissed speculation he might try to capitalize on the leading opposition Socialist party's crisis by threatening a third election if he doesn't get their support in parliament to form a government.

Rajoy said Thursday a third election in a year would be "madness," adding that he would seek talks rapidly with the Socialists as Spain needed a government urgently.

An internal revolt resulted in the resignation of the Socialist party's leader last week and raised the possibility the group might alter its total opposition to Rajoy and help end Spain's nine-month deadlock following two inconclusive elections.

Rajoy's conservative Popular Party, which heads a caretaker government, needs only a handful of votes or abstentions in Parliament to form a minority government.