On a cold December day in 2007, José Luis Peñas received a phone call from the man he had recently betrayed. Francisco Correa, a powerful business magnate, was ringing to ask whether they could meet the following evening.

Peñas, a town councillor in a Madrid suburb, had worked with Correa for two years: they had started a political party together, to compete in local elections on an anti-corruption ticket. Peñas ran the campaign, Correa financed it. The pair were very different – Peñas was an affable bear of a man, while Correa, more than a decade older, was wiry and quick to anger – but they became close, talking almost every day, sharing confidences, dining with one another’s families. Correa’s young daughter even called Peñas Tio Pepe, Uncle Pepe.

But within a few months, Peñas had realised that his friend was corrupt: Correa’s real business was conspiring with local politicians to rig lucrative public contracts. Instead of confronting him – or turning him in – Peñas spent more than a year covertly gathering evidence against his boss.

Now, after amassing hours of secret tapes, Peñas had finally gone to the police to report Correa for a series of crimes that threatened to land his former partner in jail for a very long time – along with a powerful cabal of corrupt politicians and businessmen. But the investigation was still a secret: the police wanted to collect more evidence before arresting Correa, who still had no idea he was being taped.

When the phone rang, Peñas panicked. Had someone in the police tipped Correa off? After all, the businessman was impeccably well connected. In 2002, he had even been a witness at the wedding of the daughter of José María Aznar, then prime minister of Spain. Peñas pushed his fears out of his mind, said yes and hung up.

The next day, Peñas arrived at the office on Calle Serrano, Madrid’s most exclusive street, at about 5pm. One of Correa’s men showed him into the dimly lit office and told him to wait in an empty conference room. Left alone, Peñas reached into his jacket pocket to turn on the dictaphone he had been using to record Correa and his top lieutenants for the past 18 months. As he waited, he tapped the table anxiously and walked over to the window to stare at the pouring rain outside. He received a message on his phone: Correa was running late. Peñas wondered whether Correa had gone somewhere public so that he would have an alibi for what might follow. He imagined a large man coming in, opening the window and hurling him off the fourth floor balcony.

After more than an hour, Correa arrived. What Peñas would record that evening would become the key piece of evidence in the most far-reaching corruption scandal in Spain’s modern democratic history. The case would help shatter the nation’s two-party system, transform how the public viewed the people running the country and, eventually, bring down a government. Originally centred on illegal dealings between small city councils and Correa’s network of businesses, the investigation eventually swept up hundreds of suspects in its net. Investigators named the case “Gürtel” – a German word for “belt” – after Correa himself, whose surname means “belt” in Spanish. “Gürtel is Spain’s Watergate,” said Peñas’ lawyer, Ángel Galindo, last year.

In the 12 years since Peñas began recording, Spanish voters’ confidence in their government has collapsed. When the financial crisis struck, ordinary Spaniards emerged from the boom years to find that their mortgages were unpayable, their jobs had disappeared and social services were being cut. They realised they had been conned – not by criminal masterminds, but by an old boys’ network of greedy politicians and opportunists who had systematically rigged public tenders, inflated costs for necessary works and pocketed the difference.

The effects of the Gürtel case – and a string of other scandals that have come to light over the past decade – are still shaking Spanish society. In 2015, spurred on by anger at political sleaze, coalitions backed by the leftwing populist party Podemos won mayoral seats across the country. Later that year, in general elections, Podemos and centre-right Ciudadanos dealt a definitive blow to the two-party system as, for the first time since the return of democracy, the vote was split between four major parties. But while anger over Gürtel has ended complacency over corruption, it also destroyed trust in public institutions and helped open the way for the return of the far right. In regional elections last year, a relatively new party named Vox campaigned on a hardline anti-immigration, anti-feminism platform, pitching itself as the only force capable of standing up to self-serving political elites. In December, it became the first far-right party to win seats in Spain in almost 40 years.

After his downfall, many Spaniards would come to see Correa as the embodiment of the venal culture that had made the country rich in the 1990s and 2000s, only to leave it on the brink of collapse soon after. He was ambitious, reckless and flashy. But when Peñas first encountered him, almost two decades earlier, those same qualities had a certain attraction. Correa was thrillingly confident and successful. “His name was synonymous with business,” Peñas told me. “He was the guy who pulled the strings.”

The two met in 2001, when Peñas was a junior member of the People’s party (PP), the conservative party founded by one of Franco’s former ministers in 1989, which had become the default home for rightwing Spanish voters. Peñas, then a councillor in Majadahonda, a commuter town just outside Madrid, was getting married. The local mayor, Guillermo Ortega, told him it would be good for his career to invite Correa – Ortega’s key backer – so he did. As a wedding present, Correa gave the couple a week’s holiday in Mauritius. They had never met before.

Over the next few years, Peñas and Correa saw little of each other but in 2005, that all changed. In February, Ortega resigned as mayor, officially citing health reasons, amid media reports of a falling out with PP leadership over his handling of an important land deal. A few months later, Peñas and another local PP politician publicly alleged that the same land deal was a scheme to defraud taxpayers. The case was investigated by anti-corruption prosecutors but later dropped when they found no evidence of criminal wrongdoing. Peñas and his colleague, meanwhile, were expelled from the PP – in retaliation, they claim, for their attempts to report corruption. (The PP declined requests to comment on why Peñas was expelled, or any other aspect of the Gürtel case.) Peñas found himself politically homeless, while the loss of a key ally had left Correa fearing that he would be frozen out of lucrative business opportunities in Majadahonda. When Correa offered to back a new party run by Peñas, it seemed like the perfect solution.

Initially, Peñas says, Correa’s status and connections – he remained close to other senior PP figures even after the Majadahonda feud – made it impossible for him to consider that his financial backer was also corrupt. Peñas had seen signs of corruption before among colleagues, he said, but in late 2005, after overhearing Correa discuss a bribe so blatant he couldn’t ignore it, he was forced to make a decision.

That night Peñas couldn’t sleep. Lying in bed, he ran over his options. He could go to the police, but who would believe him? Correa knew everyone. And Peñas had been burned before after reporting alleged corruption. He knew he needed hard evidence. He had to get Correa on tape.

Peñas kept working on the new political party with Correa, but from early 2006 he began recording his friends and colleagues, hiding his voice recorder inside a folder he would place on the desk, or keeping it in his jacket pocket. “I was so scared. I feared that one day the recorder would start playing,” Peñas said. “I’m no spy.” Many hours of tape were inaudible and had to be discarded. “What really drove me was seeing that it was the People’s party itself that was driving this,” Peñas told me. “Correa was just an individual but the People’s party protected dozens like him.”

Francisco Correa in Valencia, 2013. Photograph: Heino Kalis/Reuters

Correa did not have the background of a typical PP ally, but he spent a lifetime learning how to ingratiate himself with Madrid’s conservative elite. He was born in 1955 in Casablanca, where his republican father José had fled in the 1930s after the Spanish civil war. The family enjoyed a comfortable upper-middle-class life, until political unrest in the newly independent Morocco forced them to leave. Returning to Madrid with almost nothing, the family had to begin again from scratch.

As a teenager, Correa began working as a bellboy in a hotel in central Madrid. Driven and diligent, he worked his way up and built a promising career in a travel agency in his 20s before starting his own travel and events companies and investing in real estate. He wanted to succeed where he thought his father had failed, says Maria Antonia Puerto, Correa’s first wife. “He always put power and ambition above all else,” she told me.

In the mid-90s, after being introduced by mutual associates, Correa began organising holidays for senior members of the PP, establishing himself as a successful legitimate contractor. Years in the high-end travel industry had taught him how to cater to the rich and powerful, and by the end of the decade, Correa had progressed to organising campaign events for the party, later earning a reputation for staging flamboyant rallies in bullrings with elaborate firework displays.

But Correa was not satisfied. Spain was booming and everyone knew the real money was in construction and lucrative public-private contracts. In a cluster of wealthy towns on the outskirts of Madrid, all traditionally controlled by the PP, Correa found a foothold where he could begin conspiring with local officials to rig certain contracts in his favour. Together they would inflate the price of a contract – building works, street cleaning, public information campaigns – award it to a company Correa controlled and make sure that everyone who mattered got a cut. A smooth talker, Correa was adept at “sobremesa” politics – informal “over dinner” business dealings – and began searching for more and more mayors who, in exchange for kickbacks, he could co-opt into the scheme.

In time, Correa would build around him a revolving team of advisers: accountants, some of whom logged the steady stream of bribes and kickbacks; lawyers to construct elaborate offshore company structures that were used to hide money; charismatic dealmakers who solicited new marks for business and expanded operations beyond Madrid. His number two, Pablo Crespo, a former senior member of the PP in Galicia, helped cement Correa’s connection to the party that became his most important client.

Dressed in designer suits, his hair slicked back, Correa had the air of a Wall Street banker attending a costume party as Al Capone. “He would pick up your bill, lavish you with expensive gifts,” David Fernández, a journalist who wrote a book about the Gürtel case, told me. “For many politicians who were easily corrupted this was incredibly attractive, and Correa knew how to exploit this. He had this gift for that old way of doing things in Spain.” Mayors and their families received holidays through Correa’s travel company, or gifts of designer watches or sports cars. Over expensive dinners in Madrid’s elite Salamanca neighbourhood, Peñas said, Correa would order wine but leave it untouched to retain a clear head. While his guests, politicians in charge of vast budgets, drank or chased women, Correa patiently watched for their weak spot. “With his ambition, nothing could stop him. If he saw the possibility of a deal, he went for it,” Arturo González Panero, former mayor of Boadilla del Monte, a wealthy town 10 miles west of Madrid, told me. Correa was “completely unabashed, unscrupulous”.

If bribery didn’t work, he turned to blackmail. When Panero refused to cooperate, he claims that Correa threatened to end his career. Planning how to respond to the mayor, Correa allegedly brainstormed ideas with his right-hand man Crespo, who took notes on a pad of lined paper that was later seized from his office. “We don’t want to fuck up your life,” read point one of 23. “He [Correa] has treated you like a brother and you’ve treated him like a dog.” If Panero didn’t come around, the note continued, they would release a videotape of him, surrounded by piles of cash, taking a bribe. (Panero, who denies any wrongdoing, is currently awaiting trial in a further part of the sprawling case. He denies taking a bribe or any knowledge of the videotape. No such videotape was found during the investigation.)

There were other pressures to get in line, Panero told me recently. Only 33 years old when he became mayor, Panero said the hierarchical culture of the PP meant it was difficult to push back when the party asked you to work with Correa or another favoured businessman. Panero alleges that Luis Bárcenas, then chief administrator of the party and later treasurer, ordered him to award contracts to specific companies. He claims to have refused to follow these orders, but speculates that others in his position could have been swayed by this kind of pressure. “It’s not just the temptation of being offered 100m pesetas (£513,000) for a contract,” Panero said. “It’s also the pressure of the treasurer of the party, a national leader calling you and telling you it’s what the party needs.”

Correa, and others like him, thrived because, until recently, corruption was not seen as a major issue. After almost 40 years of dictatorship, Spain welcomed democracy in the late 1970s, and from the mid-1980s support for the political system was consistently high. Corruption was a problem, of course, but it was not a priority. In the early 1990s, long before the Gürtel case, the Socialist party – traditionally the other major force in Spanish politics besides the PP – was itself implicated in a string of financial and political scandals. But partly because there were few political alternatives for voters angry at corruption, the two major parties had little incentive to clean up their act.

Besides, most people had other things on their minds, not least the prospect of making money. In the housing boom that lasted from the mid-1990s to 2007, Spain built more homes than France, Germany and the UK combined. And it wasn’t just housing. Towns with populations of tens of thousands built airports, while new roads and high-speed rail lines spread like spiderwebs across the country. And with each development came the opportunity for unscrupulous politicians and businessmen like Correa to rig contracts. Today, many of these dodgy housing developments and infrastructure projects stand abandoned, ruins of an age of excess. Trying to wean Spain off building, quipped one economist following the crash, was like quitting hard drugs.

Last summer, Peñas drove me around Majadahonda, the wealthy Madrid suburb that had once been the epicentre of Correa’s business. “It’s a museum of corruption,” he said, pointing out developments linked to Gürtel and other graft cases. Luxury housing developments and their accompanying garden oases crisscrossed the otherwise parched land wilting in the heat. Spanish flags hung on balconies of large apartments. The parks and streets were named after members of Spain’s royal family.

Construction in Madrid. Photograph: Pablo Blázquez Domínguez/Getty Images

In the recordings he made, Peñas sounds relaxed, his gruff voice often breaking out into a chesty laugh. But, he said, the stress of his double life was frequently unbearable. More than once he thought he was being followed. Once, when he was driving to meet Correa, he had a panic attack and had to pull over to regain his composure.

Throughout the time he was secretly making the tapes, only three people knew what Peñas was up to: his wife, one sympathetic colleague and a prominent local anti-corruption activist, Ángel Galindo, who became his lawyer. Peñas decided to tell Galindo around a year into the time he began recording. “I want to tell someone because I’m scared that I’m going to turn up floating in a river one day and that will be the end of it,” he told him.

To demonstrate what was at stake, he played Galindo one of his recordings. On the tape, Correa could be heard talking about Galindo, discussing how to persuade him to give up his campaign against an allegedly corrupt deal. The recording stunned Galindo. “I had to get out of the room to get some air. It gave me a pain in my chest,” he told me. Once he regained composure, he played the recording again, and again, until he had listened to it more than a dozen times. “It was like lifting the blindfold and being confronted with reality. How things really work.”

In May 2007, the fledgling party that Peñas and Correa had formed suffered a humiliating defeat in local elections, winning only 183 votes. After that, the pair lost contact. As Correa moved on to other ventures, Peñas and Galindo were busy transcribing the interviews and preparing the complaint they would take to the the police. Finally, on 6 November 2007, they went to the offices of the financial crimes unit of the Spanish police and handed them a CD containing almost 18 hours of recordings, transcriptions and a list of 30 names of people involved. Over several hours, Peñas told the officers his story while they took detailed notes.

It was the following month that, out of the blue, Peñas received the call from Correa. Before Peñas drove to the meeting, he told Galindo, who made sure the police knew about it. In the office on Calle Serrano on 12 December 2007, Peñas turned the recorder on and waited. When Correa eventually arrived, with his right-hand man Crespo in tow, Peñas relaxed. Their confident tone reassured him they had no idea he had been to the police.

After discussing business for an hour, Peñas and Correa moved next door to the Hotel Meliá Fénix. It was the same hotel where Peñas had first decided to begin recording his boss, and it belonged to the same chain as the hotel where Correa had, all those years ago, begun his career as a bellboy. Decorated with red carpets and gold furnishings, the building oozed the kind of ostentatious wealth that Correa adored.

That evening, as a police unit outside watched the hotel, Correa unburdened himself. A few nights earlier he had met with one of his longtime contacts at the PP, chief administrator of the party Luis Bárcenas, the man who controlled the party’s secret accounts. The meeting had not gone well. Correa and Bárcenas, despite working together for years, reportedly had a difficult relationship. Bárcenas, Correa complained to Peñas, was cutting him off from new contracts.

To draw Correa out, Peñas feigned ignorance about his friend’s relationship with the powerful politician. Correa took the bait, telling him: “I, Paco Correa, [...] have given 1bn pesetas personally to Bárcenas.” Not only that, he continued, but he knew where Bárcenas kept his money, and “how he gets it out of Spain and offshore”.

“That’s why they’re so scared of you, man,” Peñas responded, playing along. “You know everything.”

“Yeah,” said Correa. “But I’m not going to talk.”

Over the next year, police continued to gather evidence on Correa and his associates. As they listened in to his calls, officers heard Correa oscillate between the confidence of a man accustomed to buying his way out of trouble and paranoia, as he grew increasingly suspicious that someone had snitched on him.

Shortly after 10am on 6 February 2009, police conducted simultaneous raids on almost 20 properties across Spain, arresting five people and seizing company records. During one raid, officers wrestled a black USB stick from the closed fist of Correa’s accountant. On it, they found a spreadsheet that seemed to contain detailed accounting of all of the group’s illicit earnings. Payments to politicians and businessmen appeared to have been dutifully logged.

The story was a political earthquake. Within days of the first raids, allegations of corruption, previously dismissed as an isolated problem, had hit senior PP officials across the country, throwing the party into chaos and provoking resignations. Dozens of suspects would be placed under investigation for a range of charges including bribing public officials, money laundering and belonging to a criminal organisation. Many of those arrested were respected public figures. One had even been vice-president of Spain’s state oil giant Repsol, although he had left the company years before his arrest. (In 2018 he was sentenced to three years in prison for tax fraud.)

Six days after the raids, on 12 February 2009, the PP held a press conference to deny the party’s involvement in any wrongdoing. In fact, they went much further, claiming to be victims of a leftwing conspiracy. The Gürtel case, they claimed, was an unprecedented partisan attack on the party, masterminded by the controversial judge Baltasar Garzón and ministers from the Socialist party, which was in power at the time. “This is not a PP plot,” said Mariano Rajoy, who was then leader of the PP. “This is a plot against the People’s party.”

In the years after the investigation went public, the PP did everything possible to stymie its progress, bringing multiple complaints against prosecutors, police and judges involved in the case. “All of us, in one form or another, felt the breath of power on the back of our necks,” Garzón told me.

Peñas felt the threat almost immediately. Within days of the arrests, and despite the investigation being sealed by court order, it was leaked that he was the whistleblower behind the recordings. In conservative Majadahonda there were many who viewed Peñas not as a whistleblower, but as a rat, an agent of a plot to bring down the PP. On the street, people sometimes harangued or spat at him. He began receiving threatening phone calls at home. In one incident later that year, Peñas told me, his wife, Raquel, was driving home with their two young children, when she was forced off the road by another vehicle, swerving into a ditch. The three passengers were terrified but unharmed. Around 2am the following morning, a man telephoned their home. Next time, the voice told Peñas, his wife would fall from a greater height. Peñas, mistrustful of the police, did not report the incident.

Other whistleblowers experienced similar harassment. “For me it’s been like a horror film,” said Ana Garrido, a former civil servant who reported allegations of corruption in commuter town Boadilla del Monte in 2009. Garrido has faced “death threats, being chased, sued [unsuccessfully by her former employer], blackmailed and having to quit my job”.

With new, sordid details constantly seeping into the press, the Gürtel case spent years on the front pages. Newspapers reported how Correa would count envelopes of cash in full view at dinner, organise sex parties for politicians and spend so much time at a nearby brothel that they dubbed it “the office”. The men who had allegedly conspired with Correa were often referred to not by their real names, but by the colourful pseudonyms that would come to define the case in the public imagination: The Rat, The Meatball, The Moustache, Luis the Bastard.

An indignados protest in Madrid, 2012. Photograph: Emilio Morenatti/AP

The revelations came as the economic crisis began to take hold, galvanising anger about corruption. In 2011, unemployment reached 22%. Almost one in two young people were out of work. In May 2011, protesters, most of them young, began occupying plazas in Madrid, Barcelona and Valencia to protest bank bailouts, austerity and corruption. They were known as the indignados, the outraged ones. More than 6 million people took part over weeks of protests. National surveys showed overwhelming support for the movement, which transcended traditional party lines. A generation of young people with few job prospects began questioning the assumptions that had underpinned Spain’s young democracy. “Gürtel was the ‘emperor has no clothes’ moment for Spain,” said Carlos Delclós, a former indignados activist and author of a book on the movement and its political inheritor, Podemos. “Gürtel made it clear that it was not specific cases of corruption but that it was systemic. That corruption was the system.”

Despite the anger, many voters continued to back the PP, persuaded by claims that the then-Socialist government was orchestrating the whole investigation. In the snap general election of November 2011, with the nation at risk of defaulting on its debt and facing the prospect of requiring a Greece-style bailout, Spain voted resoundingly for the PP, led by Mariano Rajoy. Back in power and enjoying an absolute majority, the PP embarked on an aggressive series of cuts to reduce the deficit and rein in Spain’s spiralling debt, despite warnings it would increase hardship for many.

But the Gürtel case wouldn’t die. As investigators searched for stolen money, the case expanded to cover 15 countries. At home, police began finding Correa’s fingerprints on more and more seemingly suspect deals. One spin-off investigation, now awaiting sentencing, accuses Correa and several co-defendants of bribery and rigging a tender for state-owned airport operating giant Aena. Another ongoing investigation is examining allegations that Correa and a former PP politician, who denies wrongdoing, conspired to defraud the taxpayer in a deal to provide audiovisual equipment used for Pope Benedict’s 2006 visit to Valencia.

Between 2012 and 2014, at the height of austerity, it seemed as if everywhere you looked some previously respectable representative was on trial for stealing public money. Even the royal family, it seemed, were at it: a corruption scandal centred on the then king’s son-in-law, Iñaki Urdangarin, threw the monarchy into disrepute. In 2014, the once popular King Juan Carlos abdicated, citing health reasons, amid a sharp decline in popularity. (Last year, Urdangarin was sentenced to six years in jail for tax fraud and embezzlement.)

Most explosive of all, in January 2013, the newspaper El País published the excerpts of handwritten accounts – dubbed the Bárcenas Papers after party treasurer Luis Bárcenas – allegedly recording movements of cash in and out of a PP slush fund used to finance party campaigns. Money came in, Bárcenas later claimed in court, as large donations from businesses, and was redistributed, in cash payments in the tens of thousands which were delivered personally in envelopes of €500 notes to certain senior PP figures.

Voters were shocked by just how brazen politicians and businessmen seemed to have been. Before being jailed in 2013 for tax fraud, one PP politician in Valencia won the lottery five times. (He denies wrongdoing, claiming he was merely very lucky.) One indignados-era slogan captured the anger felt in those years: “Nos mean encima y nos dice que llueve.” They are pissing on us and telling us it’s raining.

On a cold clear morning in October 2016, a snaking line of television cameras assembled outside a courthouse in a Madrid suburb for the first day of the Gürtel hearings. It was the only courthouse large enough to host the trial, with its 37 defendants, many more lawyers and scores of journalists who packed the gallery each day.

Wearing a brown jacket and red tie over a white shirt, Correa walked into the court as a small cluster of protesters yelled insults. In the years after his arrest, Correa had become a national pariah, mockingly referred to by the nickname he reportedly gave himself years earlier: “Don Vito”, a homage to the mafia boss in The Godfather. Obsessed from an early age with escaping the financial misfortune that befell his family, he was now broke. He spent three years in pre-trial jail, unable to afford bail, which was reportedly set at €85m.

In court, Correa provided details of his working relationship with the PP. He would take suitcases full of cash to party headquarters, he said, never passing through reception but entering with a special access card that allowed him to come and go discreetly. “[The PP HQ] was my home,” he said. “I spent more time there than I did in my own office.”

José Luis Peñas leaves court in Valencia, 2011. Photograph: Heino Kalis/Reuters

As with many of the 37 defendants, who sat in clusters of rival groups, Correa appeared largely unmoved by proceedings. He and Crespo both maintained their innocence, and spent the trial whispering to each other like schoolkids in detention. But Correa did seem visibly hurt by the way Peñas had betrayed him. “I don’t have the words to describe it,” he told the court. “You’d have to be filled with such wickedness to be living in my house, […] and meanwhile recording me so that he can report me to the police.” After Peñas took the stand in December 2016, during a recess Correa challenged him in front of several onlookers. “You’re shameless,” he told his former friend. “You were filling your pockets.” In response, Peñas, remaining silent, raised his hands and placed them together to mimic someone in handcuffs.

In June 2017, nine months after testimony began, one of the final witnesses took the stand: the prime minister, Mariano Rajoy. Although Rajoy was not accused of any crimes, it was a humiliating scene for him, the first sitting prime minister to be called to trial as a witness. Correa’s testimony and the evidence of Bárcenas’s ledger of payments in and out of the party slush fund had pushed him into a corner – among the names listed in that ledger was a certain “M Rajoy”. In a series of terse exchanges with a prosecution lawyer, Rajoy denied any knowledge of his party’s involvement in the scheme. He also denied knowing Correa or receiving off-the-book cash payments.

On 24 May 2018, after six months of deliberation, the court finally handed down the sentences. Twenty-seven defendants – including two former PP mayors, two former treasurers, one former regional secretary of organisation, one former MP and a string of PP city councillors and party advisers – were given a total of more than 300 years of jail time. Correa, who late in the trial had admitted his guilt for some crimes and pledged to cooperate with prosecutors, was sentenced to a total of almost 52 years in prison on multiple counts of bribery, money laundering, tax fraud and misappropriation of public funds. His number two, Crespo, was also found guilty of charges including bribery, money laundering and fraud and sentenced to more than 37 years in prison.

For the PP, the verdict was devastating: the party itself was convicted as a direct beneficiary of the Gürtel scheme. The court found that ever since the party was founded, it had maintained a parallel accounting system to collect money from kickbacks that could be used to fund the party. The court said the testimony of Rajoy and other PP figures who denied knowing about the existence of the slush fund were “not credible”. The reputational damage was far worse than the actual punishment, which amounted to a fine of just €240,000. (The sentence would have been considerably harsher if the case was tried today, after a 2015 change in the law made illegal party financing a crime.)

Within days of the verdict, the Socialist party called a no-confidence vote in Rajoy. On 31 May, with defeat seeming inevitable, Rajoy and his closest allies skipped out on the parliamentary debate about whether he should continue to lead the country. Instead, they went to a restaurant near the presidential palace, where they remained holed up for eight hours, reportedly eating sirloin steak and drinking whiskey while the press laid siege. At 10pm Rajoy, bleary-eyed, left the restaurant to the flashes of a horde of waiting photographers. The next day, parliament ousted Rajoy’s administration in a vote of no confidence – a first in post-Franco Spain – and in its place, the Socialists formed a minority government.

In the long decade between Peñas going to the police and Rajoy’s downfall, the courts made slow progress, but public opinion shifted much faster. Before the crisis, satisfaction with the political system in Spain was among the highest in Europe, behind only Denmark, Luxembourg and Finland. After 2010, in the wake of austerity and endless corruption scandals, trust in institutions such as political parties and banks crumbled. Gürtel, like Watergate, has convinced many voters to take a conspiratorial view of politics. When a courthouse in Valencia that heard part of the Gürtel trial suffered a fire in 2017, there were immediate suspicions of foul play, and social-media hoaxes spread the theory that evidence in other PP corruption cases had been destroyed. A subsequent investigation found the fire was caused by an electrical fault.

Corruption has also shaped political debate. Catalan separatists have cited PP corruption as one justification for their proposed split from Spain, although critics point out that the former party of former Catalan leader Carles Puigdemont has also been involved in its own major corruption scandal.

Most worryingly, the far right has begun to use corruption to rally voters. “[You] now have the keys to power and will be the ones get rid of the corrupt Socialists,” Vox leader Santiago Abascal, speaking a few hours after the party’s shock success in regional elections last December, told a crowd in Seville, who chanted “Spain, Spain, Spain”. Vox, many polls suggest, now stand to become a major force on the national level, potentially overtaking Podemos as Spain’s fourth largest party.

These predictions will be tested in April, when Spain holds its fifth general election in 11 years. (Last month, the Socialist prime minister, Pedro Sánchez, was forced to call a snap election, after failing to win support for his budget.) Polls predict that no single party will be able to command a majority; the PP is on course for its worst ever result – although, paradoxically, the party stands a good chance of returning to power if it forms a coalition with Vox and the centre-right party Ciudadanos, as it has done in Andalucía.

Gürtel is far from over. The case, so vast it was split into 10 separate trials, will continue to rumble through the courts for years, with Peñas likely to be called as a witness in each case. Explosive allegations keep appearing. Former party treasurer Bárcenas, sentenced last year to 33 years in prison for money laundering, personal enrichment and tax crimes, is a defendant in other ongoing cases. In January 2019, Bárcenas told a court that several years earlier police, acting on orders of the interior ministry, had stolen documents in his keeping that allegedly proved former prime minister Rajoy had received off-the-books payments, an accusation Rajoy vehemently denies.

For Peñas, the outcome of the Gürtel case has been bittersweet. More than 12 years after he began recording, his claims have been vindicated. Yet while the sentencing noted his invaluable contribution to the case, it also questioned his complicity in corruption during the period he worked for the PP and before he began recording Correa. He was found guilty of charges including bribery and misappropriation of funds. He was sentenced to almost five years of prison time and ordered to pay more than €100,000 in fines. Peñas hopes his conviction will be overturned on appeal to the supreme court. In the meantime, he is at liberty.

Correa, who declined to be interviewed for this article, argues from prison that he has been punished excessively in a trial that was engineered for political ends. “With this trial you have orchestrated, you have completed what you aimed for and more,” he wrote in a letter to the high court, published in October. “You have managed to destroy a government and to topple a prime minister.” He continues to stick by the mantra he repeated at trial and on phone lines tapped by police in the months before his arrest. He was just a businessman, and this was just how business is done.

• This article was amended on 6 March. It originally stated that in December, Vox became the first far-right party to win seats in Spain since the death of Franco. In fact, a far-right politician called Blas Piñar López, leading the neo-falangist Fuerza Nueva party, won one seat in the national Congress in 1979.

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.