The Socialist leader stunned the country on Wednesday by announcing he was cancelling all official engagements in order to reflect on his future.
He took the decision after a court opened an initial inquiry into his wife over corruption claims.
Mr Sanchez will announce the decision on his future on Monday.
Socialist supporters travelled by bus from across the country to attend a demonstration of support for Mr Sánchez outside his party’s headquarters in Madrid, chanting “Pedro, don’t give up” and “You are not alone”.
One of those supporters, Sara Dominguez, a consultant in her 30s, said she hoped Sanchez’s government had “taken good steps for women, the LGBT community and minorities”.
Jose María Diez, a 44-year-old government official who came from Valladolid in northern Spain to express his support, said there was a real possibility that the far-right could take power if Sanchez quit.
“This will mean a step backwards for our rights and liberties,” he said.
The central government’s delegation in Madrid said that 12,500 people took part.
Spain’s PM halts public duties as wife faces inquiry
Mr Sánchez announced his decision to consider his resignation on the same day that it was revealed that a Madrid court was opening an investigation into his wife, Begoña Gómez, following allegations of influence peddling.
The accusations were brought against her by the organisation Manos Limpias (Clean Hands), led by a man linked to the far-right called Miguel Bernad.
The preliminary inquiry is looking into Ms Gómez’s links to private companies that secured government money or public contracts.
Specifically, it is examining the relationship between a foundation she ran called IE Africa Center and tourism group Globalia, whose airline Air Europa received a €475m (£407m) bailout during the Covid-19 crisis.
Mr Sánchez and his allies have insisted that the allegations, which have been widely reported in the right-wing media, are bogus.
On Thursday, public prosecutors in Madrid called for the investigation to be dropped due to lack of evidence. Mr Bernad’s lawsuit consists of news clippings, one of which has already been proven false.
Mr Sánchez, who leads a coalition government, has said that the allegations against his wife were the latest attempt by right-wing parties and media to undermine him.
“A false lawsuit must not bring down a prime minister,” said Emiliano García-Page, the Socialist president of the Castilla-La Mancha region and previously one of Mr Sánchez’s biggest critics within his party.
He spoke earlier at the Socialist Party’s federal committee, which Mr Sánchez did not attend.
Also speaking at the meeting, María Jesús Montero, the first deputy prime minister, denounced “a savage far right and a complicit and cowardly right”.
“Prime minister, stay. Pedro, stay. We are with you,” she said. Ms Montero would be caretaker prime minister if Mr Sánchez were to step down on Monday.
Alternatively, there is speculation that he could call a parliamentary confidence vote to consolidate his position or call elections, although that would not be possible until the end of May.
However, opposition politicians have accused Mr Sánchez of playing the victim and of having no intention of resigning.
“The most serious thing are the authoritarian quirks of the prime minister and his government, who believe themselves to have impunity, in a refusal to accept democracy that we haven’t seen since [dictator Francisco] Franco,” said the leader of the conservative People’s Party (PP) Alberto Núñez Feijóo.