VATICAN CITY — The historic announcement of Benedict XVI that he would resign as pope Feb. 28 has set off a global guessing game as to who will take his place on the altar in St. Peter’s Basilica.

But in the last weeks and months of his pontificate, Vatican power brokers have also been furiously jostling and speculating over another mystery: who will ascend to the presidency of the Vatican bank.

That search ended Friday when Benedict, in one of his last acts as pontiff, appointed German lawyer and member of the Knights of Malta, Ernst von Freyberg, to head the Vatican’s embattled bank. A church statement hailed his “professional and moral excellence” and said he brought a “vast experience of financial matters and the financial regulatory process.”

Housed in the Bastion of Nicholas V, a round, 15th-century fortress that sits like a footstool below the Apostolic Palace, the Institute for the Works of Religion(IOR), commonly called the Vatican bank, controls $7 billion in assets divided among 33,000 accounts. For decades, the bank has played a central role in spy thrillers and conspiracy theories and has generated a steady stream of allegations that mobsters and right-wing dictators used the bank to launder money.

In 1982, Italian magistrates investigating money laundering indicted the Vatican bank governor, American Archbishop Paul Marcinkus (nicknamed “The Gorilla” for protecting Paul VI from a knife-wielding attacker). Soon after, police in London found Marcinkus’s friend and associate, Roberto Calvi, known as God’s Banker, hanging under Blackfriars Bridge. His pockets were stuffed with cash and bricks.

“Because of its opacity, its lack of transparency, IOR always comes up,” said one Italian judicial official, who like others interviewed for this article, spoke on the condition of anonymity to disclose internal deliberations. “It’s an offshore bank in the heart of Rome. What could be better?”

In September 2010, Rome prosecutors investing the bank’s possible violations of anti-money laundering laws through Italian banks seized an about $30 million transfer of suspicious origin and investigated its top executives. The Vatican protested, and the money was released partly in response to Benedict’s financial reforms, including his willingness, revolutionary in the hermetic institution, of opening up the bank’s books to European auditors.

But the “Vatileaks” letters suggested strong resistance from Secretary of State Tarcisio Bertone and his allies. They appeared to water down Benedict’s watchdog agency and slowed the transparency process. Last year, the Council of Europe noted that the Vatican had “come a long way in a short period of time.” But it also called the Vatican’s watchdog powerless to sanction the Vatican bank. Just last month, credit card transactions were frozen in Vatican museums because of outside concerns over inadequate money-laundering controls.

An Italian government official with close ties to the Vatican said that a prominent cardinal said to him of the Vatican’s flirtation with transparency, “We shouldn’t have done it, because it’s like opening up Pandora’s box.”

To boost its transparency efforts, the Vatican brought in Ettore Gotti Tedeschi, a conservative Catholic and well-known banker. But Gotti Tedeschi did not do well under Bertone and was ultimately mocked by Bertone’s associates, who described him as a man whose days as bank president were numbered, according to one witness.

On the day Vatican police arrested the pope’s butler for leaking his personal correspondence to an Italian journalist, Gotti Tedeschi met his friend Giuseppe Orsi, the head of the Italian defense and aerospace conglomerate Finmeccanica for lunch. Gotti Tedeschi chose the restaurant for its private salons, but their private conversation would soon become public.

Magistrates from Naples, Italy, had been investigating Orsi for alleged kickbacks related to helicopter sales to India. They learned about the reservation and, according to one Italian justice official involved in the operation, instructed the restaurant’s owner to lead the two power brokers to a private table, under which police had placed a listening device. A police officer dressed as a waiter listened as Gotti Tedeschi complained about the power politics in the Vatican.

“It’s an atmosphere exactly like other atmospheres of power, made of corrupt liars and blackmailers!” he said, according to a transcript of the wiretapped conversation, confirmed by judicial sources.

His concerns were prophetic. The next day, members of the bank’s board, with the backing of Bertone, fired Gotti Tedeschi, who burst out of the bank’s corporate headquarters and went public, complaining to Reuters, “I have paid the price for transparency.” The Vatican countered by releasing a memo signed by Carl A. Anderson, head of the U.S.-based Knights of Columbus and secretary of the Vatican bank’s board of supervisors, characterizing Gotti Tedeschi as an obstacle to transparency and accusing him of exhibiting “erratic personal behavior” and a “failure to carry out basic duties,” and of even leaking documents.

In the meantime, Naples magistrates had obtained a wire on Gotti Tedeschi’s phone in hopes of learning more about the alleged India scheme. Instead, investigators ended up learning more about the Vatican.

“In the phone calls, he felt attacked from the inside,” said the official, who listened in as Gotti Tedeschi unburdened himself about Bertone blocking the transparency push. The banker also confided, “I fear for my life.”

The magistrates then raided Gotti Tedeschi’s home and office for documents related to Finmeccanica. They called in the police’s Ecological Operations Unit, which, according to its website, has officials with knowledge of “geology, mineralogy, cartography and topography” but has emerged as an elite crime-fighting force led by Capt. Sergio De Caprio, alias Ultimo, the officer who captured the global leader of the Sicilian Mafia. (De Caprio has a falcon in his office, and, according to a person who has talked to him there, sometimes lets it fly around.)

According to another Italian justice official, that unit found a series of documents related to the Vatican, in which Gotti Tedeschi expressed concern that the Vatican’s measures to prevent money laundering “weren’t tough enough.”

The first official, who also saw the documents, said Gotti Tedeschi considered Bertone an “adversary” and had prepared unflattering information about the bank’s accounts to be opened “if something should happen to me.”

The Vatican hopes the selection of von Freyberg, the new president, will put such controversies to rest. But during his first appearance before Vatican reporters Friday, he was asked about his chairmanship of a company that manufacturers warships, a product not aligned with the church’s mission of peace.

On a recent morning, Anderson, the bank board’s secretary, arrived in Rome on an overnight flight looking bleary-eyed as he sat on a Vatican panel about church activity in the Americas. Two chairs down sat Cardinal Marc Ouellet, the former archbishop of Quebec, who tops many short lists to replace Benedict as pope.

“The most important thing any Christian or Catholic can do in terms of evangelization today is to have an authentic witness in his or her personal life,” Anderson said, and that “we not compartmentalize our lives, so that we live an integrated, authentic life of integrity of Christian faith wherever we find ourself.”

As he exited the stage, Anderson agreed to return for a brief interview. A few minutes later, as reporters huddled to talk about the Vatican’s failure to replace Gotti Tedeschi at the top of the Vatican bank, Anderson’s press aide reappeared to inquire about the subject of the interview. When he learned it was the bank, he disappeared and reported back a few minutes later. Anderson wouldn’t be able to speak after all.