The country's biggest opposition party, led by Pedro Sanchez, filed the motion seeking Rajoy's ouster in the 350-seat lower house of parliament on Friday. No date has been set for the vote, but the bid is being taken seriously in Madrid where a legislative election is not due for another two years.
The surprise move came a day after Rajoy's Popular Party (PP) was found guilty of benefiting from illegal funds in a massive graft trial.
"The PP leadership is concerned and does not totally rule out that the number of votes needed to overturn the government could be found," the La Razon newspaper, considered close to the PP, said on Saturday.
The Socialists also clarified their strategy on Saturday.
If Sanchez can get the absolute majority required in parliament and replace Rajoy, the party intends "to govern for the amount of time it considers appropriate (and) then call an election" after "some months", said one of his
spokespeople, the former culture minister Carmen Calvo.
The Socialists can already count on the support of anti-establishment Podemos but would need to convince Catalan separatists and Basque nationalists -- or the liberal Ciudadanos party -- to ensure a majority.
Rajoy's allies Ciudadanos, who have overtaken the PP in some recent polls thanks to a hard line on Catalan separatism, immediately said it would oppose the no-confidence motion and instead called for snap polls.
Ciudadanos number two Jose Manuel Villegas said Saturday that he was ready to talk to the Socialists about "another way of calling elections immediately". Analysts said Ciudadanos has no reason to support a no-confidence motion that could lead to an alternative leftwing government headed by the Socialists.
The Basque Nationalist Party has promised to "study the proposal", its president Andoni Ortuzar said Saturday, questioning if the no-confidence move was "serious and viable" or just electioneering.
Rajoy, a devoted Real Madrid fan, cancelled his trip to the Champions League final in Kiev to deal with the crisis and his lieutenants counter-attacked in the media.
"Pedro Sanchez will go down in history like the Judas of Spanish politics," said PP's Fernando Martinez-Maillo, accusing the Socialist leader of seeking power on the back of "separatists who want to destroy Spain".
Spain's National Court said Thursday it had uncovered a vast system of bribes given to former PP officials in exchange for lucrative public contracts between 1999 and 2005.
The court sentenced 29 people to jail for a total of 351 years for corruption, embezzlement and money laundering in the so-called Gurtel trial.
The PP itself was not on trial for direct involvement in the scheme but was found to have benefited from funds obtained illegally through "an authentic and efficient system of institutional corruption" including a slush fund. It
was ordered to pay back 245,000 euros ($290,000).