VATICAN CITY (Reuters) - Domenico Giani, the Vatican’s longtime security chief and Pope Francis’ main bodyguard, resigned on Monday over leaks related to an investigation into alleged financial wrongdoing in the Vatican.

FILE PHOTO: Pope Francis is seen at the Vatican walking next to Domenico Giani, Inspector General of the Corpo della Gendarmeria, the police and security force of Vatican City, before boarding a bus heading to Ariccia, south of Rome, to make his Lent spiritual exercises March 5, 2017. REUTERS/Tony Gentile

Giani, 57, a former member of Italy’s secret services, had been part of the Vatican security apparatus for 20 years, serving three popes, and had held the top post since 2006.

No previous head of Vatican security has left under a shadow in living memory. His resignation is the latest twist in a saga that has gripped the Vatican for two weeks.

It started with an unprecedented and unexplained Oct. 2 raid by Giani’s men on two key Vatican offices, the Financial Information Authority (AIF) and the Secretariat of State.

The subsequent leak and publication in Italian media of an internal police notice bearing pictures of five Vatican employees, including the number two at AIF and a monsignor in the Secretariat of State has left the Vatican in turmoil.

The shaven-headed Giani, who was often seen by the pope’s side or running along beside the popemobile as it moved through crowds, signed the notice which showed the five, including a woman, in a format similar to a “most wanted” flyer.

Vatican sources said the pope was furious over the leak of the notice, issued to guards at gates telling them the five could not enter the Vatican because they had been “preventively suspended”, and had ordered an investigation.

Slideshow ( 2 images )

Sources said he was upset that the five had been represented in such a way even though they were not formally suspected of anything and while the investigation, into an international real estate deal, was still in its infancy.

In a statement on Monday, the Vatican said publishing the notice was “prejudicial to the dignity of the people involved and to the image of the Gendarmerie” but that Giani “bears no personal responsibility in the unfolding of events”.

Giani himself told the internal Vatican Media website that he assumed “objective responsibility” as commander of the Vatican’s Gendarmerie.

GENDARMERIE WORKS WITH SWISS GUARD

The Gendarmerie provides security together with the Swiss Guard, a separate unit with its own commander. Both travel with the pope when he leaves the Vatican.

When police raided the offices on Oct. 2, seizing documents and electronic devices, the Vatican said it was a follow-up to complaints filed in the summer by the Vatican bank and the Office of the Auditor General, and related to “financial operations carried out over the course of time”.

Vatican sources say the still-murky episode has all the hallmarks of a power struggle involving the AIF, the Vatican bank, the office of the auditor general and the Secretariat of State, the nerve centre of the tiny city-state.

The Vatican’s chief prosecutor Gian Piero Milano opened an investigation into the real estate deal after he received complaints from the Vatican bank, officially known as the Institute for Works of Religion (IOR), and the auditor general’s office against “unknown persons”.

Milano’s investigation involves a stake in a building on London’s posh Sloane Avenue that the Secretariat of State purchased years ago as an investment.

According to Vatican sources, the Secretariat of State wanted to buy out an Italian partner so it could get full control over the property.

The Secretariat asked the IOR for a short-term bridge loan of about 150 million euros but the IOR refused. Instead, it and the acting auditor general filed complaints to prosecutor.