The country is being run by a government without full powers after inconclusive elections in December and June that saw Rajoy's conservative Popular Party (PP) win without an absolute majority and other parties fail to forge a rival coalition.
The polls in the northern regions of Galicia and the Basque Country have thus been seen as a possible game-changer, reflecting the public mood as an October 31st deadline looms.
If no government emerges by then Spain, the eurozone's fourth largest economy, will face an unprecedented third election around Christmas.
The PP renewed its absolute majority in Rajoy's rainy northwestern home region of Galicia, a long-time party stronghold.
And the party lost just one seat in the independence-minded Basque Country where its strong defence of a united Spain has never been popular.
Rajoy's party won 41 out of 75 seats in the regional parliament in Galicia – equal to its share in the outgoing assembly – with over 95 percent of ballots counted.
In the verdant Basque country in northern Spain, the PP came in fifth with nine seats in the 75-seat assembly, down from 10 seats in the outgoing assembly, after 99 percent of the ballots had been counted.
The moderate nationalist PNV party was once again the most-supported party in the Basque region as expected, winning 28 seats, but without an absolute majority.
In both regions, the Socialist party (PSOE) lost seats from previous elections four years ago and lost votes to new anti-austerity party Podemos, which is seeking to replace it as Spain's main party on the left.
The PSOE finished fourth in the Basque region, behind Podemos, and was tied in Galicia with the En Marea coalition which includes Podemos with 14 seats each.
“These results are not good for the Socialist party,” said Cesar Luena, one of the most senior officials in the formation.
“It is a negative result in both regions,” he added.
The Socialists' poor showing follows bad results in December's general election and again in the June repeat vote.
It is expected to increase pressure on Socialist leader Pedro Sanchez to allow Rajoy to form a new government at national level.
'Making fools of ourselves'
Sanchez had voted against a Rajoy-led government in a parliamentary vote of confidence earlier this month. He is seeking to negotiate a leftwing coalition alternative with arch-rival Podemos.
But a weak result could wreck this strategy, either forcing Sanchez out or pressuring him into allowing the rightwing coalition government through by abstaining in another vote of confidence.
The PP's secretary general, Maria Dolores de Cospedal, said the Socialists had been “punished at the ballot box for the institutional deadlock” they had created and called on the party to “reflect” on its results.
The Socialist will hold a leadership meeting on Saturday to decide their next steps in the national impasse in the light of their regional showing.
Sanchez is unpopular among many so-called barons, or regional party leaders, who think the party should help end to Spain's nine-month deadlock by admitting defeat and allowing Rajoy to come to power. Poor results at regional level could re-open an internal leadership war.
Spain has never had a coalition government since its return to democracy after the death of dictator Francisco Franco in 1975.
This lack of experience has been blamed in part for the failure of talks to create a governing alliance.
Voters, though, are starting to get frustrated with the political vacuum.
“We are making fools of ourselves,” said 61-year-old civil servant Mercedes Solana, as she cast her ballot in the fashionable Basque resort of San Sebastian.
By Daniel Bosque with Daniel Silva in Madrid / AFP