Jewish reaction to President Obama’s declaration of support for same-sex marriage was swift. Liberal Jewish groups, including Hadassah and the United Synagogue of Conservative Judaism, praised the president’s statement, and the Reform movement’s Religious Action Center declared, “History will regard the president’s affirmation of this core right for the LGBT community as a key moment in the advance of civil rights in America.”

Orthodox Jews stood apart. The centrist Orthodox Union proclaimed itself “disappointed” with the declaration, while the ultra-Orthodox Agudath Israel of America took the opportunity to attack not Obama, but liberal Jews. Responding to National Jewish Democratic Council Chair Marc Stanley, who declared admiration for the president’s upholding the Jewish value of tikkun olam, Agudah spokesman Avi Shafran wrote that “to imply that a religious value like tikkun olam — and by association, Judaism — is somehow implicated in a position like the one the president articulated is outrageous, offensive, and wrong.”

Many Orthodox Jews regard rejecting state recognition of same-sex marriage as a matter of religious principle. After all, Leviticus states unequivocally that “a man may not lie with another man as one lies with a woman. It is an abomination.” As these Orthodox Jews see it, two sides confront each other: knee-jerk Jewish liberalism where Judaism is equated with liberal values and Torah-based, authentic, Orthodox Judaism.

A similar confrontation occurred a century and a half ago. America was embroiled in a civil war over slavery, and the battle was intra-Christian. As both sides were Protestants who saw Scripture as the ultimate source of religious truth, they were both interested in what the People of the Book thought about this question.

Responding to President Buchanan’s call for a national day of fasting in the wake of the Secession Crisis, on January 4, 1861, eminent Orthodox Rabbi Morris Jacob Raphall gave a thunderous sermon supporting slavery. Raphall, a New York rabbi, was a vociferous opponent of Reform Judaism. He prided himself on his profound knowledge of, and fidelity to, the Bible. The New York Times reported that in his sermon, “The learned sage [Raphall] delved deep into the Hebrew Bible — citing the books of Leviticus, Deuteronomy, Job and even Exodus — before concluding that ‘slaveholding is not only recognized and sanctioned as an integral part of the social structure… [but] the property in slaves is placed under the same protection as any other species of lawful property.’” While Raphall acknowledged that he personally found slavery distasteful, since the Bible sanctioned it, the institution was perfectly legitimate. As Raphall put it, “I grieve to find myself saying a good word for slavery, but God and the truth must prevail!”

Against Raphall rose the German-American Reform Rabbi David Einhorn, who at that time was a rabbi of a congregation in Baltimore, a pro-slavery city. On April 19, 1861, Einhorn delivered a fiery sermon attacking Raphall’s defense of slavery.

In his sermon, Einhorn lamented Raphall’s ignorance, saying that Raphall’s biblical interpretations were forced and that they ignored the fact that God created all human beings in his image, which guaranteed every individual the right to dignity and respect. Raphall’s ignorance manifested itself in his slavishness to the biblical letter: He failed to appreciate the living spirit of Judaism. Einhorn noted that while the Pentateuch spoke of slave holding, this institution gradually declined among Jews during the biblical era, and by the rabbinic period Jews rarely owned slaves. Einhorn concluded his sermon by decrying the “chillul hashem” (desecration of God’s name) committed by Jews who defend slavery. Imputing pecuniary motives to the defenders of slavery, Einhorn wrote, “Only such Jews, who prize the dollar more highly than their God and their religion, can demand or even approve of this!”

Reaction to Einhorn’s sermon was swift and brutal. A pro-slavery mob destroyed the printing press in which Einhorn regularly published anti-slavery articles, and he was driven out of Baltimore.

There is a remarkable similarity between today’s Jewish opponents of same-sex marriage and the Jewish opponents of emancipation a century and a half ago. Both rely heavily on Scripture, ignoring the fact that Judaism is a living, developing tradition. Judaism’s meaning is not contained in Scripture alone. If it were, Jews would lobby to legalize polygamy and would advocate the death penalty as punishment for adulterers.

Moreover, marriage equality is a civil matter, not a religious one. No governmental body is telling religious groups to perform same-sex marriages. It is simply a matter of same-sex couples having the same benefits and state recognition for their marriages as do heterosexual couples. American law pays no attention to Jewish law. It permits all sorts of activities contrary to Jewish law, such as allowing women to divorce their husbands, and it prohibits actions recommended by Jewish law, such as an uncle marrying his niece. Yet Orthodox leaders never contemplate withdrawing political support from candidates who support these laws. Why is same-sex marriage different?

History has judged Raphall’s defense of slavery poorly. No Orthodox rabbi today would defend his view. Decades from now, people will similarly judge Orthodox opposition to same-sex marriage poorly. Just as Einhorn sanctified God’s name by rejecting slavery on the basis of the Torah’s commitment to justice and individual dignity, so today’s religious Jews sanctify God’s name by defending state recognition of same-sex marriage on the basis of those same Torah principles.

Michah Gottlieb is assistant professor in the Skirball Department of Hebrew and Judaic Studies at New York University.