ROME — The Vatican’s big fraud and extortion trial resumes Friday after exposing some unseemly realities of how the Holy See operates, with a new spy story taking center stage that is more befitting of a 007 thriller than the inner workings of a papacy.

According to written testimony obtained Thursday, one of Pope Francis’s top advisers brought in members of the Italian secret service to sweep his office for bugs and commissioned intelligence reports from them, completely bypassing the Vatican’s own police force in the process.

The reported actions of Archbishop Edgar Peña Parra, the No. 2 in the Vatican secretariat of state, raise some fundamental questions about the security and sovereignty of the Vatican City State, since he purportedly invited foreign intelligence operatives into the Holy See’s inner sanctum, and then outsourced internal Vatican police spy work to them.

Peña Parra hasn’t been charged with any crime, though his subordinates have. They are among 10 people, including a once-powerful cardinal, on trial in the Vatican criminal tribunal in connection with the Vatican’s bungled 350 million euro investment in a London property.

In the trial, which resumes Friday, prosecutors have accused the Holy See’s longtime money manager, Italian brokers and lawyers of fleecing the pope of tens of millions in fees and of then extorting the Vatican of 15 million euros to finally get full ownership of the property.

Peña Parra’s role in the scandal has always been anomalous, since he authorized his subordinates to negotiate the final contracts in the deal, and then triggered a suspicious transaction report when he sought a 150-million-euro loan from the Vatican bank to extinguish the mortgage on the property. But prosecutors at least for now have spared him indictment.

The new testimony, reported by the Italian agency adnkronos and Domani daily and obtained Thursday by The Associated Press, provides another twist in the affair and underscores the Hollywood levels of intrigue that plague the Vatican and have rarely come to light. Until now.

One of Peña Parra’s former deputies, Vincenzo Mauriello, told prosecutors that in May or June 2019, after the London deal was finalized, Peña Parra told him he wanted to do a security sweep of his office because he believed his private conversations “after a short while were becoming known outside.”

Peña Parra asked if Mauriello if he knew anyone outside the Vatican security apparatus who could do the job and Mauriello said he suggested a friend who worked in Italy’s AISI foreign intelligence service. After a preliminary meeting, the spy, Andrea Tineri, conducted the sweep on a Friday afternoon when few people were in the palazzo, Mauriello testified.

Nothing was found. But Peña Parra then asked Tineri to produce some intelligence dossiers on key figures, Mauriello testified. Tineri and his boss at the AISI presented the findings to Peña Parra, handing over a white envelope in one of their many encounters on Vatican soil, he said.

Adnkronos quoted unnamed Italian intelligence officials as denying Mauriello’s account. But Vatican prosecutors identified Tineri by name in their search warrant as one of Mauriello’s contacts, and said he had visited the Vatican eight times. Vatican prosecutors apparently didn’t realize he was a member of Italy’s foreign intelligence service and that they were identifying and publishing wiretaps of a foreign spy.

That the Vatican and Italy cooperate on security matters is not unusual: Italian police patrol St. Peter’s Square, and there are official levels of cooperation between Vatican gendarmes and Italian law enforcement. But Tineri’s spywork for Peña Parra certainly fell outside official channels, intentionally so. Mauriello recalled that he even had to escort Tineri past the Vatican security booth at one point because the gendarmes were asking too many questions.

Peña Parra, who remains in his day job as the Vatican interior minister, declined to comment Thursday, citing the ongoing trial, his office said. He didn’t refer to Mauriello’s claims in his lengthy defense memo to Vatican prosecutors. But he made it clear that as soon as he arrived at the Vatican in late 2018, he found a series of problematic activities that he sought to clean up, including outrageous spending, intransigent employees and dubious decision-making in the operational headquarters of the Holy See.

It is not the first time the secretariat of state has outsourced intelligence work: Cardinal Angelo Becciu, who was Peña Parra’s predecessor, is on trial in part because he hired a self-styled Sardinian security analyst with purported claims to the Italian intelligence services as a consultant to help negotiate the liberation of Catholic missionary hostages in Africa.

And Pope Francis himself authorized Vatican prosecutors to conduct wiretaps of Italian citizens on Italian soil, in yet another of the sovereignty-defying details of the case.