Far-left party Podemos had asked Pedro Sanchez to make public the names of those who benefited from an amnesty which the then conservative government implemented in 2012 during the economic crisis to collect money and reduce the deficit.
The amnesty -- which allowed tax dodgers to come forward and declare all their undeclared assets and income, paying a one-off 10 percent penalty -- was declared void last year by the Constitutional Court, but the effects are not retroactive.
Speaking to parliament, Sanchez said this meant it was "not possible to review the cases of those who benefited from that amnesty", nor was it possible to reveal their names.
"I don't have any idea who benefited from the amnesty," he added.
Allegations are swirling that they could include former king Juan Carlos, who abdicated in 2014 following a series of scandals.
If true, this would imply that he had had secret, undeclared bank accounts before the amnesty, at the height of the economic crisis.
Spanish media last week released audio of his former German mistress Corinna zu Sayn-Wittgenstein, in which she made a number of allegations against Juan Carlos.
Among other things, she alleged he had several bank accounts in Switzerland, some of which he submitted for the tax amnesty in 2012, and others which he kept secret and put in the name of a cousin.
"The bank accounts in Switzerland that didn't come back in the amnesty were put under his name," she said in the recording.
As a result, Podemos has pushed for Sanchez to reveal the amnesty names.
"The citizens of our country have the right to know if the former king is a fraudster or not," Podemos lawmaker Ione Belarra said.
Sanchez instead announced that his government would present a draft bill to "ban any future tax amnesty laws".
Juan Carlos has been in the eye of the storm since the recordings of Sayn-Wittgenstein came to light.
She has not denied the voice in the recording was hers, but issued a statement denouncing a smear campaign.