MADRID — A growing number of Spanish politicians and business leaders are ending their careers in an unexpected place: behind bars.

Almost 1,500 people in Spain faced trial for corruption between July 2015 and the end of 2016, according to official figures. Around 70 percent of them were found guilty.

Since the country’s transition to democracy in the late 1970s, those sitting on the defendant’s bench have included top business people, ministers, regional presidents, mayors and even Princess Cristina, the king's sister. In the past few months alone, the entrepreneur Iñaki Urdangarín (Cristina's husband and King Felipe VI's brother-in-law) and former International Monetary Fund chief Rodrigo Rato were among those sentenced to prison.

Mariano Rajoy will soon become the first sitting prime minister to appear as a witness in a Spanish court when he gives evidence in a massive corruption case involving the alleged illegal financing of his Popular Party (PP).

“In Spain justice walks slowly, but it rarely stops,” said Salvador Viada, a prosecutor at the Supreme Court.

For years, corruption has been ranked as the second biggest cause for concern after unemployment. The combination of a seemingly never-ending series of graft scandals and a devastating economic crisis has led many to question hitherto esteemed Spanish institutions and shaken up the political landscape. Yet even the harshest critics of the establishment praise the work of rank-and-file judges. The leader of the far-left party Podemos, Pablo Iglesias, recently hailed prosecutors and magistrates for “protecting the dignity” of the country.

“In Spain justice walks slowly, but it rarely stops” — Salvador Viada, a prosecutor at the Supreme Court

Putting Spain’s elite in jail hasn’t been easy. Insiders describe a daunting task in which they have to put up with scarce resources, overcome political and media pressure, deal with a judicial hierarchy chosen for its ideological proximity to politicians, and outmaneuver a government capable of hampering investigations.

“These sort of cases get going by means of heroism,” said a judge who investigated one of the most important corruption scandals in the past decade.

In 2013, the Group of States Against Corruption — which was set up by the Council of Europe — said in a report about Spain: “While the independence and impartiality of individual judges and prosecutors have been broadly undisputed to date, much controversy surrounds the issue of the structural independence of the governing bodies of the judiciary and the prosecutorial service — the primary concern being the appearance that partisan interests could penetrate judicial decision-making processes.”

The organization issued 11 recommendations to help Spain tackle corruption. Three years later, it concluded that none of the recommendations had been “implemented satisfactorily.”

Water firm scandal

The latest graft scandal to have made the headlines is known as the "Lezo case."

In April, Ignacio González, the PP’s president of the Madrid region until 2015, was arrested and detained as part of an investigation into a public water company. He's accused of profiting from investments made in Latin America through the state-owned firm that has an annual budget of €1 billion. González's brother and around a dozen former public officials and businessmen have also been detained.

Details of the investigation have been leaked to the press, including wiretapped communications that appear to show González trying to use his powerful position to evade justice.

José Antonio Martín Pallín, a former judge at the Supreme Court, said the tone of the leaked conversations was somewhere “between pornographic and Mafia-like.”

In one conversation, from 2016 (after he left office), González spoke to former PP minister Eduardo Zaplana about appointing a new chief anti-corruption prosecutor, Manuel Moix, whom he describes as a “serious and good” man.

In published records of the conversation, González said he was thinking of calling Justice Minister Rafael Catalá to explain to him the importance of the issue. “The state machinery and the media” are key, González was recorded saying. “Either you have them under control or you’re dead.”

Moix was appointed as chief anti-corruption prosecutor six months after that conversation.

“I hope the troubles draw to a close soon,” was the SMS that Catalá sent to González when the latter congratulated him on his appointment, according to a leak of the investigation.

Viada of the Supreme Court said the most worrying thing is not that the men talked about how to place friendly faces in key posts, but “that they achieved their goal.”

The many years it’s taken for justice to catch up with González isn't a surprise to people familiar with the judicial system.

He added that the Lezo case has shown that “politics wields a great deal of influence in the appointment of key posts” in the justice system.

The opposition in parliament last week accused Rajoy of interfering with the judiciary — during his first appearance in Congress since the Lezo case became a fixture in the news. “I believe the anti-corruption prosecutor is a professional with a broad and successful career … who acts with full independence,” the prime minister said.

Inner workings

In Spain, judges lead an investigation and prosecutors are meant to defend the rule of law. In practice, the prosecutor's office provides resources and manpower for investigations, can call into question the actions of judges and, with some exceptions, needs to bring formal charges for a case to make it to court.

The chief prosecutor is appointed by the government and his subordinates are expected to obey his orders. Judges obey no one but the law. However, the governing body of magistrates — the Consejo General del Poder Judicial (General Council of the Judiciary, or CGPJ) — is selected by members of parliament. The CGPJ then chooses the judicial hierarchy, including the magistrates at the Supreme Court.

“The [judicial] hierarchy is appointed for its ideological or political closeness” to politicians, said Viada.

“The system is badly designed and generates some concerns, to say the least,” said Judge Jesús Villegas, who heads the legal association Plataforma Cívica por la Independencia Judicial (Civil Platform for Judicial Independence).

Villegas also argued that many comfy posts for judges depend on the arbitrary will of the government, meaning politicians have jobs to give to friendly judges.

“Imagine that you are the justice minister and I’m in my office, buried in mountains of paper, and you call me,” Villegas said. “You tell me 'Jesús, you’re great, why don’t you go to the ministry or to an embassy to write legal reports … you’re going to earn as much as you do or more, you’re going to leave the black hole you’re in, you’re going to have a chauffeur' … it changes your life.”

Viada knows all about attempted influence from his days as an anti-corruption prosecutor in the Audiencia Nacional, the most important nationwide court investigating corruption.

Once, he said, the chief prosecutor ordered him to stop investigating a politician. The problem was solved when Viada asked his boss to write the order down in a formal statement, which he refused to do. On another occasion, Viada said a state secretary (ranked just below a minister in government hierarchy) asked him to talk to a judge to convince him to stop an investigation against a banker. Viada refused.

One detail of the Lezo scandal has been especially damaging for the image of the judiciary.

In another published wiretapped conversation, González said he had been warned by a businessman that investigators had bugged those suspected of involvement in the water company case. González added that he had been told the leak came from a woman described as a “friend” and a “magistrate.”

On and on and ...

Pilar Velasco, a journalist at radio station Cadena Ser, said the Lezo case has taken far too long to resolve.

Velasco started digging into González’s dealings and lavish lifestyle around 2006. She argued that in 2009 there was “flagrant evidence” of irregularities — Gonzalez had a luxury villa in Madrid and a penthouse on the Costa del Sol, despite officially earning €6,000 a month.

In 2012 González filed a complaint against Velasco, accusing her of revealing secrets — she was placed under formal investigation for two years and later acquitted.

Yet the many years it’s taken for justice to catch up with González isn't a surprise to people familiar with the judicial system.

Until 2015, as president of the Madrid region, González was aforado — a privilege enjoyed by public officials (a quarter of a million of them, if you include members of the security services), meaning he could only be judged by the highest courts, which are more politicized and have fewer investigating resources, argued Villegas, the judge.

“It’s like there was a hidden Spain which you and I know nothing about … a dirty world where they seem to be playing in the sewers" — Jesús Villegas

Legislators enjoy yet another privilege. Any investigation into them must first be approved by the legislative chamber to which they’ve been elected (in González’s case, the Madrid assembly). Even if it gets approved, investigators lose the surprise factor.

Also, digging into opaque transactions and alleged sophisticated crimes, as in the Lezo case, relies heavily on the authorities providing key documents. Transparency laws in Spain are weak, many experts say, and therefore many of those cases fall apart once the government under suspicion leaves office.

Another important feature of the Lezo case is the media war waged against the current president of Madrid, the PP’s Cristina Cifuentes, who replaced González in 2015.

The director of the newspaper La Razón, Francisco Marhuenda, was recorded plotting against Cifuentes in order protect González and his inner circle and confessing having taken a harder tone in one of the paper’s op-ed to that end. “We have to scare her,” Marhuenda told one of his associates.

Yet for all the weaknesses of the system, once a judge is actually presiding over a case, there’s little the accused can do, no matter the power they wield. That clearly irked González who, in yet another leaked conversation, complained about judicial independence by saying “What do I have left? Fire two shots on the judge?”

The investigative judge who’s dealt with big corruption cases said: “The judge is king in the courtroom.”

Spanish judges who aren’t independent are that way "simply because they don’t want to be," said former Supreme Court magistrate Martín Pallín, adding that it would have been better for the country to address its corruption problem with preventive measures.

“Justice is like medicine,” he said. “When you need to have surgery, it means things have become a little complicated.”

“If members of the crown or ministers haven’t been put on trial in other countries of Europe, it isn’t because they’re cleaner than we are,” said Villegas, adding that the Lezo case has eroded his faith in justice.

“It’s like there was a hidden Spain which you and I know nothing about … a dirty world where they seem to be playing in the sewers … behind those men dressing elegantly and posing for photos, is it all like that? Is it all really like that?”