In an appeal to the Madrid court, prosecutors said there was no evidence in the complaint against Begoña Gómez.
The court began the case into claims by a right-wing anti-corruption group.
But the group has since acknowledged the allegations could be false.
The Spanish Prime Minister announced he was cancelling his agenda on Wednesday evening, in a dramatic online statement that said he needed “stop and reflect”. He complained of “unprecedented slander and harassment from the right and far right”.
He said his wife would work with the judiciary to make clear there was no substance to the claims and that he would make a decision on his political future on Monday.
The Madrid prosecutor’s opposition to the case which has been brought against Ms Gómez is a boost for the prime minister as he considers his future.
But with the justice system often moving slowly, it could take some time for the case against Ms Gómez to be shelved, if that is the ultimate decision.
The complaint against Begoña Gómez was raised by anti-corruption campaigners Manos Limpias (Clean Hands), led by a man linked to the far right called Miguel Bernad.
Given the track record of Clean Hands, which has presented a litany of unsuccessful lawsuits against politicians in the past, the public prosecutors’ decision is not necessarily surprising.
Although the court in Madrid did not give details of the case, the complaint emerged online showing a list of allegations culled from news websites including El Confidencial and Voz Populi.
Manos Limpias put out a statement on Thursday signed by Mr Bernad acknowledging that its allegations might be false: “If they are not true, it will be up to those that published them to take responsibility for the falsehood.”
This episode will do little to improve the image of Spain’s judiciary, which a 2023 barometer showed was one of the least independent in the EU in the eyes of its citizens.
Some left-wing politicians have even accused the judiciary of being weaponised by the political right. For proof, they point to alleged smear campaigns against the leftist Podemos party and Catalan independence leaders.
Mr Sánchez complained in a statement of a “strategy of harassment” over months aimed at weakening him politically and personally targeting his wife. “I am not naive,” he said, arguing they were “denouncing Begoña” for no other reason than that she was his wife.
The court did not give details of the accusations against Begoña Gómez other than to say it had begun investigating allegations of influence peddling and corruption on 16 April.
However, the Cadena Ser website published the allegations, culled from news websites including El Confidencial and Voz Populi.
El Confidencial reported on Wednesday that the inquiry was looking into Begoña Gómez’s links to private companies that had secured government money or public contracts.
In particular, it cited a “sponsorship agreement” involving tourism group Globalia and a foundation she ran in 2020 called IE Africa Center. In 2020, Globalia secured a €475m (£407m) bailout for its airline Air Europa, as part of a series of government rescue packages for companies during the Covid-19 crisis.
With significant elections approaching in the next two months, Conservative Popular Party leader Alberto Núñez Feijóo accused the prime minister on Thursday of creating “a political survival operation” and turning it into a show.
Mr Sánchez has been in power since 2018, and his Socialist party is due to contest European Parliament elections in June and elections in the Catalonia region of north-eastern Spain next month.
He was due to take part in a campaign launch in Barcelona on Thursday. His decision to cancel several days of official engagements in order to decide whether he resigns or takes another course of action has led the nation into uncharted waters.
Pedro Sánchez leads an awkward coalition that includes two Catalan separatist parties, which were persuaded to join the government in return for an amnesty that covered a banned Catalan referendum on secession in 2017.
Without the support of the Catalan Republican Left (ERC) and Together for Catalonia (JxCat) he would not have been able to stay in power, following an inconclusive election last year.
Opposition parties were outraged by the amnesty, which could mean the return to Catalonia of former regional leader Carles Puigdemont. He is running as a candidate, seven years after he fled imminent arrest and went into exile in Belgium.