Rabbi Toaff was at one point captured by the Nazis and sentenced to die by firing squad — he was reportedly forced to dig his own grave — but he managed to escape. After the war he served as chief rabbi of Venice, and he was chosen as spiritual leader of the Jews of Rome in 1951, at a time when the community, perhaps the oldest in Europe, was severely diminished in numbers and vitality.

“The Italian Jewry was devastated and severely traumatized in the wake of the war,” David I. Kertzer, a professor of Italian studies at Brown whose book “The Pope and Mussolini: The Secret History of Pius XI and the Rise of Fascism in Europe” was awarded a Pulitzer Prize on Monday, said in an interview. “Not just by the Holocaust. Preceding that, the Italian Fascist regime enacted racial laws, aimed principally at Jews, and unlike the Jews of Germany, the Italian Jews thought of themselves as quintessentially Italian. They had been there for 2,000 years. All this came as a shock, so it was a double blow.

“Rabbi Toaff lived through all this,” Professor Kertzer added. “So even before becoming chief of Rome in ’51, he was a heroic figure, associated with resistance, and with rebuilding.”

By his own reckoning, Rabbi Toaff, who retired in 2002, focused the greatest part of his effort on rebuilding Jewish schools and fortifying Jewish education in Rome. But he is perhaps best known for the invitation he extended to Pope John Paul II to pray with him in Rome’s central synagogue, an act that cemented his international legacy.

The pope accepted, and subsequently made the first recorded papal visit to a synagogue. The event, on April 13, 1986, came more than two decades after the publication of “Nostra Aetate” (“In Our Times”), the document produced by the Second Vatican Council of 1962-65 that rejected the longstanding belief among many Roman Catholics that the Jews were collectively responsible for the death of Jesus, and it was widely seen as a profound step toward the healing of almost two millenniums of enmity between the faiths.