Spain's Prime Minister Mariano Rajoy admitted Thursday he made a mistake in trusting a party colleague at the centre of a major corruption scandal but rejected repeated calls to resign.

Rajoy, 58, came out fighting in parliament, pouring scorn on calls for him to step down over allegations surrounding his ruling Popular Party's disgraced former treasurer, Luis Barcenas.

The affair has threatened to destabilise his government as it works to strengthen the public finances of the eurozone's fourth-biggest economy, anxiously watched by its neighbours.

"I made a mistake in maintaining confidence in someone who we now know did not deserve it. He fooled me," said Rajoy, who for months had resisted even pronouncing Barcenas' name in public.

The grey-bearded prime minister said he was appearing before the special session of parliament to "refute the lies, manipulations and malicious insinuations encouraged by certain political leaders".

He said his conservative Popular Party did pay its officials extra money in addition to their salaries for "work done". But he denied receiving illegal payments from the party and said he paid taxes on all income.

Opposition leaders took turns to lay into Rajoy in response, reiterating their calls for him to resign, with some demanding snap elections, but he remained defiant throughout the five-hour session.

"I reply to you very clearly and directly: no... I am not going to resign, nor am I going to call legislative elections," he said.

"I am not going to declare myself guilty, because I am not."

Rajoy, who took power after leading his party to a landslide election win in November 2011, said ledgers published in the press supposedly showing slush fund payments to him and other party members were "an astonishing and imaginary collection of falsehoods".

Rajoy's appearance followed months of damaging leaks in the press and pressure from political opponents who threatened a no-confidence vote.

The opposition Socialists accused Rajoy of lying to the nation and of changing his story as he responded to the allegations over recent months.

"You did not tell the truth when you said that it was all false," Socialist Party leader Alfredo Perez Rubalcaba said.

"You are doing damage to Spain. For that, I ask you to go. I ask for an act of solidarity with a country that cannot suffer for having at its head a prime minister like you."

The corruption affair originated in 2009 as a judicial investigation into alleged kickbacks involving members of the Popular Party and construction companies.

It exploded in January when leading daily El Pais published copies of account ledgers purportedly showing irregular payments to top party members, including Rajoy who has led the party since 2004.

Those allegations sparked outrage among ordinary Spaniards struggling with spending cuts that Rajoy has imposed during a deep recession.

The noose appeared to tighten around the premier when Barcenas testified in court on July 15 that he handed cash to Rajoy.

Conservative newspaper El Mundo calculated that Barcenas paid a total of 343,700 euros (around $456,000) to Rajoy over two decades.

Barcenas was jailed last month pending an investigation into a separate corruption case, in which he is alleged to have held 47 million euros in secret Swiss bank accounts.

Political analysts say it is unlikely Rajoy will step down. Such resignations have been very rare in Spanish politics since the restoration of democracy in 1978.

Rajoy pointed to signs that Spain's economy was starting to recover after two years of recession.

Figures for the second quarter showed unemployment fell from above 27 percent to 26.26 percent and the pace of the recession slowed, with a 0.1 percent contraction compared to 0.5 percent in the first quarter.

Spain's borrowing costs eased in a government bond sale coinciding with Thursday's parliamentary session, a sign of strengthening confidence by investors in Spain.

Fighting to lower its public deficit, Spain "must take special care what signals its sends to the international financial markets", Rajoy told parliament.

The Madrid stock market was 0.74 percent higher in midday trade.