Many intrigues and scandals have gripped Spain in recent years, from alleged royal corruption to ministerial dirty tricks against political rivals, yet in all that complexity one character seems to have been ever-present.
José Manuel Villarejo's name, and to a lesser extent his face - due to his obsession with disguise - are now known by millions in Spain. It is an ironic fate for an undercover policeman whose true identity was meant to remain his best-kept secret.
Mr Villarejo on Friday faces the first of what could be a series of criminal trials, as Spanish courts unravel his dealings through more than 25 separate investigations.
The 69-year-old former police commissioner has spent the last three years on remand in custody, after judicial authorities arrested him in his house near Madrid.
They seized his trove of files and secretly recorded conversations, with a cast list of politicians and public figures that reads like a Who's Who of modern Spain.
Since his arrest, leaked excerpts from Mr Villarejo's tape collection have created a series of scandals.
None have been greater than the conversation with Corinna zu Sayn-Wittgenstein, the ex-lover of former Spanish King Juan Carlos.
Her apparently candid comments in meetings in 2015 and 2016 about the ex-monarch's alleged penchant for receiving multi-million cash commissions for deals with Arab countries led to money-laundering investigations in Switzerland and Spain.
Juan Carlos, at the moment in exile in the United Arab Emirates, denies any wrongdoing and has said he is available if prosecutors need to interview him.
The princess and a fake lawyer
According to an affidavit sent by Mr Villarejo to the examining magistrate at Spain's National Court who is currently investigating 27 different criminal cases in which he is implicated, the former policeman said he was sent to London to gain Ms zu Sayn-Wittgenstein's confidence, in order to "neutralise" her as a threat to the stability of the Spanish monarchy.
In the document, seen by the BBC, Mr Villarejo claims that agents from Spain's CNI intelligence service "instructed me to gain Princess Corinna's trust in order to recover especially sensitive documents she held".
He said he had posed as a lawyer offering to help Ms zu Sayn-Wittgenstein, who complained she was being harassed by Spanish secret service agents.
Mr Villarejo, who calls Ms zu Sayn-Wittgenstein "the princess" in reference to her previous marriage to a German prince, says his inability to succeed in the mission earned him the enmity of the then-director of the CNI, Gen Félix Sanz Roldán.
Mr Villarejo claims the man who led the CNI until 2019 brought about his downfall.
In a television interview in 2017 Mr Villarejo accused Gen Sanz Roldán of threatening to kill Ms zu Sayn-Wittgenstein, a claim that led the former spymaster to report him for slander.
Mr Villarejo is going on trial because of that accusation against the general, and for having accused him of supplying a photograph of Mr Villarejo to a newspaper that broke his cover. The former police commissioner faces a two-year sentence if found guilty.
The BBC asked Mr Villarejo's lawyer for comment but received no reply.
Mr Villarejo's "princess" is to appear as a defence witness. The 56-year-old Ms zu Sayn-Wittgenstein has already written to the Madrid court describing her version of a meeting at London's Connaught Hotel in May 2012: "General Roldán threatened me and my children. His words were that he could not guarantee [my] physical safety or that of [my] children', unless I complied with his instructions."
Gen Roldan denies any such threat was made.
Corruption in ruling party
Among the string of criminal investigations involving Mr Villarejo is his involvement in the so-called "Operation Kitchen", in which the policeman is accused of heading up an effort to steal documents from a former treasurer of the then-ruling party in Spain, the Popular Party (PP), during the era of former conservative Prime Minister Mariano Rajoy.
Luis Bárcenas was arrested and jailed in 2013 for his off-the-books accounting, in which companies paid cash donations to the PP allegedly in return for public contracts.
According to prosecutors whose investigation was unsealed last year, Mr Villarejo and other police officers, acting on orders from interior ministry officials, mounted an espionage operation to seek and destroy files that Bárcenas or his wife had in their possession, thus concealing evidence from the judicial probe into the PP's finances.
In 2018 Bárcenas was sentenced to 33 years in jail for money-laundering and tax offences and the PP was also convicted as an entity, and ordered to pay a fine.
Mr Villarejo's police career started in the early 1970s in the Basque Country, where the militant pro-independence group Eta had launched a violent insurgency against the nationalist Franco regime's security forces.
Later, between 1983 and 1993, he officially left the police force and set up business interests around the world, although his version is that he was always at the service of the Spanish government and used his companies to provide cover for foreign security operations.
On his return, he says he was never officially assigned to any police unit, instead being given sensitive missions. Mr Villarejo claims to have averted several terrorist attacks against Spain.
However, he is accused of hiring out his police knowhow in a private capacity.
In one of the cases, Mr Villarejo is described in the judicial writ as having carried out massive spying on behalf of BBVA bank, involving thousands of intercepted messages and phone calls, including the private communications of a top government adviser.
He is also suspected of spying on Catalan pro-independence politicians and creating false corruption files to smear the left-wing party Podemos.