Spain's acting Prime Minister Mariano Rajoy has accepted the king's petition to try to from a government following last month's inconclusive elections but has not made it clear if he will definitely present himself before parliament for the necessary approval.

Rajoy was designated by King Felipe VI late Thursday as the monarch ended three days of consultations with party leaders aimed at snapping a seven-month political deadlock following inconclusive elections in December and June.

Speaking to reporters, Rajoy would not say clearly if he will present himself for investiture if he is unable to muster enough parliamentary backing.

Rajoy's conservative Popular Party, in power since 2011 and now running a caretaker government, won most seats in both elections but lacks a majority and has virtually no outside support.