Mariano Rajoy Reuters

The Spanish government was suddenly rocked by scandal Thursday after documents were published that allegedly showed Prime Minister Mariano Rajoy getting €277,000 ($376,000) that had been hidden from tax authorities.

Rajoy denied the allegations after the Madrid newspaper El País published extracts from what it said were secret accounts for his conservative ruling People's Party, the Guardian reported. But opponents demanded his resignation, and ordinary Spaniards asked whether those now imposing draconian austerity had practiced, or tolerated, systematic tax avoidance.

El País published images of excerpts of almost two decades of handwritten accounts that it said were maintained by People's Party treasurers, Reuters reported. The newspaper said the accounts showed 11 years of payments to Rajoy of €25,200 ($34,200) a year.

The accounts -- which El País said amounted to a parallel unofficial bookkeeping system -- indicate donations from prominent businessmen, mostly builders, that were then partly used to pay regular supplements to senior party officials over more than a decade. The most recent payments were in 2009.

Hundreds of Spaniards gathered outside party headquarters in central Madrid on Thursday evening in peaceful protests, chanting 'Thieves!' and bearing placards reading 'Resign Now!'.

"The People's Party has only one set of accounts and it is clean, transparent and submitted to the official accounting authority," said Secretary-General Maria Dolores de Cospedal, who said she was also speaking for Rajoy. "We have absolutely nothing to hide."

But former PP Deputy Jorge Trías Sagnier has already said that senior party members had received regular payments, the Guardian reported.

Cospedal, who denied getting the money attributed to her in the documents, threatened to sue El País and any media that repeated the allegations. But all major Spanish broadcasters and news websites were carrying the story.

"The party vehemently denies the contents of these documents," she said. "I have spoken to the prime minister and he is calm."

Former Senate President Pío García Escudero, however, admitted receiving one of the payments detailed in the accounting books. He said the figure matched a loan he was given, and later repaid, to repair bomb damage to his home after a terrorist attack.

"If the figure relating to Pío García Escudero is true that does not validate everything else that has been published," Cospedal insisted.

"The documents could contain all sorts of things – the truth and things that are not true. They could be reworked, manipulated or cut."

El País said the documents came from a double-accounting system kept by two former PP treasurers, Luis Barcenás and Alvaro Lapuerta. Both men also issued denials Thursday.

Bárcenas already is under investigation for allegedly having €22 million ($30 million) in a Swiss bank account and is alleged to have kept a double accounting system for the party to hide the payments.

High Court Judge Pablo Ruz, who is investigating a four-year-old corruption case involving the PP, has asked prosecutors to look into the new allegations and could open another line of investigation, court sources told Reuters.

The party has ordered an external audit of its accounts.

A recent poll by Metroscopia showed that 96 percent of Spaniards believe corruption is widespread in politics, after dozens of cases emerged in recent years, most notably an ongoing judicial investigation into alleged embezzlement of public funds by King Juan Carlos' son-in-law.