In 1765, the Virginia Gazette, a bookseller in Williamsburg, Virginia, sold a two-volume set of “Sale’s Koran” for 16 shillings to Thomas Jefferson. Five years later, a fire burned many of the young lawyer’s books and papers. It is not clear if the Quran survived that fire, but according to historian Denise A. Spellberg, author of “Jefferson’s Qur’an,” a two volume initialed set of Sale’s Quran was sold in 1815 to the Library of Congress, along with 6,485 other books. Jefferson’s Qur’an then survived a third fire that destroyed two-thirds of the collection on Christmas Eve, 1851.

As with Jefferson’s Quran in the Library of Congress, until now, no fire has been able to extinguish the spirit of inquiry grounding Jefferson’s ideals of religious freedom and civil rights. While many commentators have framed President Trump’s “Muslim ban” as an assault on foreign nationals and refugees from seven majority Muslim countries, among them Iran, what is at stake is Jefferson’s legacy: the founding ideas that frame the United States Constitution and define our character as a nation.

In the debates on bills about immigration, naturalization and citizenship in Virginia, Jefferson rejected religious discrimination. In his notes, he lamented the fact that Jews, the quintessential refugees, were “barred from citizenship everywhere in the world.” He not only supported the admission of Jews, but defended universal citizenship as beneficial, both for economic and demographic reasons. According to Spellberg, Julian Boyd, the editor of Jefferson’s papers, credits Jefferson as the first to reject “Protestant exclusivity in immigration and naturalization in Virgina — and by extension the United States — opening the door to Catholics.”

In the Virginia bill, there were no religious qualifications for citizenship. After completing a period of residency, “all persons born in other countries” were to be “considered as Free Citizens of the Same” and “entitled to the Rights, privileges and immunities, civil and religious of this Commonwealth, as those born therein.”

E pluribus unum is not about building walls. It is about transcending divisions.

Jefferson’s vision of America as a world nation was founded on universal, rather than tribal and religious, principles. It had many detractors then, as now. Informed by the Crusades and clashes with the Ottoman empire, legal references of the time described “Turks and infidels” as “perpetui inimicia,” enemies for life. From Cotton Mather to Franklin, Muslims, like Jews, were lampooned as “the other.” Their religious beliefs and origins made them subhuman, damned as heathens, outside the pale of both Christianity and the European enlightenment.

As Spellberg observes, Jefferson scoffed at the notion of perpetual enmity between nations and religions, dismissing it as “groundless.” Instead he aimed to inoculate America against the religious prejudice and persecution infecting Europe — and now the Middle East — by anchoring the American Constitution and character in John Locke’s “A Letter Concerning Toleration”:

“Neither Pagan nor Mahamedan [Muslim] nor Jew ought to be excluded from the civil rights of the Commonwealth because of his religion.”

In American democracy, as opposed to Europe’s warring theocracies and monarchies, the legitimate exercise of authority was focused on checking harmful behavior, not religious beliefs. As Jefferson put it, “The legitimate powers of government extend to such acts only (emphasis added) as are injurious to others. But it does me no injury for my neighbor to say there are twenty gods or no God. It neither picks my pocket nor breaks my leg.”

No one can accurately predict or prevent acts of terrorism. And all Americans recognize the grave challenge of protecting the nation, and indeed, the world, against violent and harmful acts sanctified in the name of God. But for the president to single out Muslims — including thousands who have fled to the United States to escape religious and political persecution — is to confuse prejudice with policy and the particular with the general. Americans do not blame or ban all Christians for the violence of the Ku Klux Klan. President Trump is a genius at marketing and branding. But popularity and profitability are not a substitute for principle. Such anti-Islamic polemics and policies grant license to every deranged and disturbed individual, as well as more sinister anti-American political and economic forces, to strike the matches that can set entire communities, nations and civilizations ablaze.

Jefferson made America great by making religious pluralism, equality not discrimination and humanity not cruelty, the cornerstone of our Constitution and character as a nation. It is by honoring, not repudiating his legacy, that we can keep America great.

Khosrow B. Semnani, an industrialist and philanthropist, is the founder of the Omid for Iran, a nonprofit focused on civil rights in Iran. Amir Soltani produced and co-directed the PBS documentary “Dogtown Redemption.”