MADRID — The stench of corruption clings to Spanish politics — and especially to the ruling Popular Party of Mariano Rajoy.

Between July 2015 and September 2016, 1,378 officials or politicians from across the spectrum faced trial on corruption charges, according to the General Council for the Judiciary.

The PP is desperately trying to keep its litany of scandals off the political agenda. But, with the liberal Ciudadanos party breathing down its neck in polls and high-profile cases rarely out of the headlines, the party has been forced to shift its position. Where it previously insisted allegations were either unfounded or politically motivated, Rajoy's PP now acknowledges there has been a problem.

Yet in a country frequently wracked by scandal, one particular case promised to shed new light on the shady wheelings and dealings of the ruling party. Even so, few anticipated the frank admission of wrongdoing that a key defendant in the case offered.

“This is a country of thieves and its justice system doesn’t work" — Julio Anguita, veteran communist leader, in 2009

Ricardo Costa, former secretary general of the PP in Valencia, appeared before the Spanish High Court in January. He was accused of having helped run a massive network of bribes-for-contracts in the region during the decade-long economic boom.

"It’s true that the PP financed its 2007 election campaign with dirty money," he said at one point. “I didn’t denounce that and I am willing to assume responsibility for it. I acknowledge the accusations and I apologize.”

Costa, who could face up to eight years in prison if found guilty, went on to incriminate his former boss, Francisco Camps — who resigned in 2011 amid similar allegations despite being absolved by the courts — for overseeing the kickbacks scheme.

In the wake of Costa's courtroom mea culpa, the PP’s spokesman, Rafael Hernando, described the situation as “a disgrace and I apologize to people who, in good faith, have voted for the PP.”

“The winter of 2018 is turning out to be a particularly cold one for the PP in the courts,” wrote El País newspaper, which said that Rajoy's party is currently facing over 50 investigations for allegedly corrupt practices.

The PP (which declined to comment on the issue for this article) is not the only tainted party.

High profile cases feature members of the Spanish Socialist Workers’ Party (PSOE) and the Catalan nationalist Convergència Democràtica de Catalunya, and point to the intractability of corruption in Spanish politics more widely.

Transparency International’s corruption perceptions index puts Spain in 42nd place, behind Portugal, Costa Rica and Botswana. Unsurprisingly, Spaniards see corruption as their second-biggest national problem, after unemployment, and they frequently wonder why their political class is so prone to abusing power.

For some, like veteran communist leader Julio Anguita, the answer is blindingly simple.

“This is a country of thieves and its justice system doesn’t work,” he said in 2009.

But while weaknesses in the judiciary help explain the phenomenon, others look to history and culture to make sense of Spain's polluted politics.

Political parties as 'mafias'

Many of the abuses committed in modern-day Spain have their roots in the 1936-1975 dictatorship of Francisco Franco. Contrary to a widespread myth, Franco’s rule was deeply corrupt, with the dictator enriching himself and putting in place what his biographer Paul Preston has described as “institutionalized pillage.”

“In countries that have emerged from fascism, whether it’s Spain or in Latin America, we have inherited the corrupt structures of that fascism,” said Argentine satirist Darío Adanti. “And when democracy has arrived it’s not easy to dismantle them — on the contrary, democracy then grows on top of those foundations.”

Adanti and a group of colleagues have channeled Spaniards’ outrage at their representatives’ misdemeanors through the risqué comedy of Mongolia magazine. (The cover of its February edition depicted Francisco Camps with a photoshopped Hitler mustache and the banner headline “Mein Camps.”)

The years after the dictatorship were a key period for Spain in terms of its relationship with graft, said Edu Galán, a fellow editor at Mongolia. The express-speed modernization of that time and the country’s 1986 accession to the European Union, he said, were both a blessing and a curse.

“The only institution that has more buildings per town than the Catholic Church is the PSOE" — Jaume Muñoz, author

“Managing such a huge amount of money in such a young democracy is very difficult unless you maintain the methods learned during the dictatorship,” he said.

By 1990, the governing PSOE was engulfed in scandal, with Deputy Prime Minister Alfonso Guerra eventually resigning due to the misconduct of his brother, Juan, in the first of several affairs that would taint the Socialist administration.

A recent probe revealed the extent to which PSOE officials exploited their power in the region of Andalusia, where the party has governed without interruption since the return to democracy. Two former regional presidents, Manuel Chaves and José Antonio Griñán, are currently on trial for their alleged part in a scam that included fraudulent early retirement packages, company subsidies and commissions handed out to the tune of €136 million.

Spain’s corruption flashpoints reveal a pattern: Regions where power is concentrated in one political party are particularly susceptible to graft.

Jaume Muñoz, author of a history of Spanish corruption, "La España corrupta," points out that in Andalusia, “the only institution that has more buildings per town than the Catholic Church is the PSOE.”

The PP’s electoral strongholds, meanwhile, include the regions of Madrid and Valencia, both of which are now inextricably linked to kickback scandals.

Corruption happens "because there’s an almost unlimited power in places where [parties] have spent a long time in government without anyone offering checks and balances,” according to Joan Coscubiela, a former spokesman for the leftist Catalonia Yes We Can (CSQP) party.

Under such circumstances, the political parties “become kind of mafias, they have the power,” said Muñoz. “People don’t complain about the bad things that they do. [In that context], the PP, the PSOE or Convergència just become a power rather than a political party.”

This holds true in Catalonia, too, where the dominant force since the democratic transition has been Convergència, an earlier incarnation of Carles Puigdemont’s Catalan European Democratic Party (PDeCAT).

In 2014, the party was rocked by scandal after its founder and former leader Jordi Pujol — the godfather of modern Catalan nationalism — confessed to having hidden a fortune in tax havens outside Spain. In January, the party’s former treasurer, Daniel Osácar, was jailed for his part in a scheme that used Barcelona’s plush Palau de la Música venue as a front for €35 million in false accounting. A total of €6.6 million in illicit commissions were illegally funneled into Convergència’s coffers.

“Everything was taken … by the party," said Emilio Sánchez Ulled, the state attorney, in his summing up of the case. “That’s not just a figure of speech, it’s a mindset, a way of thinking, and that’s the saddest part of all.”

Democratic deficit

Despite the sheer quantity of such cases in recent years, there are those who believe that the era of impunity is coming to an end.

In particular, three lawsuits brought against former PP Economy Minister Rodrigo Rato are seen as landmarks. Rato, who has also had stints as managing director of the IMF and chairman of the lender Bankia, is currently appealing a four-and-a-half-year jail sentence for his part in the distribution of unregistered credit cards to the bank’s board members — himself included — who used them to spend millions on private expenses.

“Corruption is an extractive system, like the landowner system, or slavery, there’s an organized group taking money" — Simona Levi, Italian artist

Rato is also awaiting trial for two other cases in which he is accused of fraudulent practices during his chairmanship of the bank.

It was a small group of online activists, born out of Spain’s Indignados protest movement, which initially brought Rato to justice. Calling themselves 15MpaRato, the activists created an anonymous online mailbox for whistleblowers and used its contents to incriminate the former politician and financier.

Simona Levi, an Italian artist who is part of the group, described Rato’s reckoning as their “greatest work of art.”

Levi is convinced that Spain’s political parties and their connivance with banks and other supposedly apolitical institutions are at the heart of the country’s corruption problem, along with lackluster state attorneys. But she also hints at a more cultural factor, pointing out that the nations on Europe’s southern periphery are particularly vulnerable due to their callow or fragile democratic traditions.

“Corruption is an extractive system, like the landowner system, or slavery, there’s an organized group taking money,” she said.

“Democracy isn’t the best environment in which those people can operate, because it requires transparency and a series of things which don’t help them,” she added. “Greece, Italy, Spain, Portugal — these are all countries that have a huge democratic deficit.”

In Spain, the justice system contributes to that shortfall. A Eurobarometer poll last year showed that Spaniards had less faith in the independence of their judiciary than any of their EU neighbors, except Hungary and Poland. Last year, the newly appointed top anti-corruption prosecutor, Manuel Moix, resigned after the Panama Papers revealed he had hidden assets in an offshore company.

But there is also a feeling that the media has failed to audit politicians and businesses with sufficient rigor.

Drops in revenues over the last decade have forced newspapers to make mass layoffs, hobbling investigative reporting. In addition, after media conglomerates expanded during the country’s economic boom into other sectors, including book publishing, real estate and cable television, they became increasingly wary of reporting on those industries or the powers behind them.

Santander, CaixaBank and HSBC are now among the shareholders of Prisa, the conglomerate that publishes El País. Another major group, Mediaset, is controlled by the Berlusconi family’s Fininvest.

“How is a newspaper going to cover a corruption story [about a bank] if the bank has shares in that very same newspaper?” says Adanti. “The mainstream media has stopped operating as the fourth power of state.”

In 2014, the departing editor of El Mundo, Pedro J. Ramírez, claimed Rajoy had pressured the newspaper’s owners to sack him because of the explosive allegations he had published about the PP’s former treasurer Luis Bárcenas.

“Too many people in Spain think that democracy is about voting every four years, and not calling to account the people who are ruling" — Jaume Muñoz

One of the paradoxes of Spain’s recent era of shame is that resignations from public office are relatively rare and, in many cases, voters have not punished their leaders. In 2016, despite a string of scandals, the PP won enough seats to form a new government. No wonder, said Jaume Muñoz, that politicians “feel the impunity the Franco-era politicians used to feel.”

“We don’t oblige our leaders to represent us, we just follow them,” he said. “Too many people in Spain think that democracy is about voting every four years, and not calling to account the people who are ruling.”

Guy Hedgecoe is a Madrid-based journalist and author of “Freezing Franco: The Battle for Spain’s Memory” (2015).