Rabbi Ovadia Yosef, who died at age 93 in Jerusalem, wasn’t just the most important rabbi in the world. He was a transformative figure in Israeli politics, galvanizing Israelis of Middle Eastern origin into their own ethnically distinct political identity and founding the religious-ethnic party Shas.

Although he viewed the Israeli state with ambivalent engagement, Yosef was a harbinger of Israel’s epochal transformation from a secular nationalist Jewish state into a religious nationalist state -- in other words, a country much more like its Middle Eastern neighbors than it otherwise would be.

Born Abdullah Yusef in Baghdad in 1920, Yosef moved to Palestine with his family as a small child and was educated in a yeshiva called Porat Yosef, founded a few years earlier to perpetuate the distinctive traditions of Jews from Arabic-speaking Mediterranean lands, a group sometimes imprecisely labeled Sephardic and today in Israel called Mizrahi, meaning “Eastern” or “Oriental.”

His rise to rabbinic prominence grew from his encyclopedic knowledge of Jewish law, which reflected the traditional Mizrahi preference for breadth of legal knowledge and practical study rather than the northern European emphasis on depth at the expense of coverage. He served as the Sephardic chief rabbi from 1973 to 1983, after a contested election in which he successfully challenged the incumbent chief rabbi with whose rulings he disagreed.

Yosef’s willingness to serve in the official governmental post of chief rabbi differentiated him from the European-origin, or Ashkenazi, leaders of ultra-Orthodoxy in Israel. Those men were either skeptical of the Zionist project or outright opposed to it, and traditionally believed that the Jewish people should not attempt to exercise political sovereignty until a supernatural messianic age brought it about. They viewed the state of Israel as secular and therefore illegitimate, and felt the chief rabbinate office gave a false religious patina to an essentially nonreligious polity.

In contrast, Yosef was willing to meet the state halfway: to insist that a truly legitimate Israel would be based on Jewish religion, not Jewish nationalism, while still engaging with the state’s political institutions. In one remarkable decision, he opined that it was prohibited for an observant Jew to initiate a lawsuit in Israel’s secular courts because their status was comparable to that of non-Jewish courts in the diaspora. Yet at the same time, he refused to call himself a non-Zionist, pointing to his service as chief rabbi.

This complexity, not to say contradiction, led Yosef to the most astonishing act of his career when in 1984 he was a founder of the Shas Party, which was both a religious party and at the same time the first overtly ethnic party in Israeli political history, aimed at furthering the interests of Mizrahi Israelis. The brilliance of Shas was that unlike previous ultra-Orthodox parties, which could not hope to get votes from anyone but the then-small minority of ultra-Orthodox Jewish voters, Shas appealed to all Jews of Eastern origin, regardless of how religiously observant they might be.

The key to this appeal was that, unlike their Ashkenazi counterparts, Mizrahi Jews had never developed an aggressive secular nationalist ideology. Even those who might not be scrupulous in their personal religious observance tended to feel warmth, not hostility, for those more pious than they. The simplest analogy is to the population in the Arabic speaking countries from which most of them came: Secularism never really caught on in the Arab world, and until today, many of those who vote for Islamic political parties are not themselves devout.

Shas caught fire and in 1999 became the third largest party in the Knesset. Although plagued by corruption scandals -- none of which touched Yosef personally -- it has remained an important force in Israeli politics. The rise of Shas made Yosef more famous and important outside the religious world than any other rabbi in Israeli life had ever been. As spiritual leader of a major party, his judgments could lead to the rise and fall of prime ministers, as has been the case for Ayatollah Ali al-Sistani in Yosef’s native Iraq.

Most significantly, Yosef in the 1990s issued a highly controversial judgment that it was permissible as a matter of Jewish law for the state to exchange territory for peace with Palestinian negotiating counterparts. This ruling, far more lenient than that of other prominent ultra-Orthodox rabbis who have considered the subject, captured Yosef’s distinctive mix of legal acumen and flexible statecraft.

In recent years, Shas has crept to the right in the Israeli political spectrum. But the real political legacy of Yosef’s career is that, by making a religious party into a mainstream, non-rejectionist national actor, he helped move Israeli political culture from secular nationalism to a more religiously-informed model. In a rough parallel to the rise of Islamic politics in Arabic-speaking countries, the politics of Jewish religion, not just Jewish nationalism, is now an enduring part of the Israeli landscape.

That this was accomplished by a rabbi of unquestioned legal preeminence, born in Baghdad, is not a coincidence.

(Noah Feldman is a Bloomberg View columnist. Follow him on Twitter @NoahRFeldman.)