“The religious leaders in the community were up in arms about the Quakers,” Charles Gehring, translator of the documents, told me. “People believed they were outside the norms of the faith — that if they didn’t punish them for their behavior it might bring down the wrath of God.” Whether out of his own bigotry or to appease his base, Stuyvesant wanted them out.

New Netherland’s diverse population included English inhabitants, who settled in several villages on Long Island. A small number of Quakers sought refuge in one of these towns: Vlissingen, later Flushing (which, it’s worth noting, is today one of the most ethnically and religiously mixed communities in America). After Stuyvesant sent word that no one in the town was to harbor the Quakers, 30 inhabitants, who were not themselves Quakers, put their signatures to a remarkable document.

“We are bound by the law to do good unto all men,” they declared. “The law of love, peace and liberty” in the Dutch Republic, they asserted, extended even to “Jews, Turks and Egyptians,” all of whom were considered “the sons of Adam.” They had no choice, they concluded, under Dutch law as well as their own consciences, but to accept the Quakers.

Stuyvesant reacted with an aggressive crackdown — not on the Quakers themselves, but on the leaders of Flushing, who he decided had defied a law against “illegal conventicles.” He ordered arrests, drew up lists of interrogatories, coerced apologies and confessions, issued fines and threw people in prison. He barred the residents of Flushing from holding town meetings, and decreed that their “heresy and unseemly lawlessness” would be rectified by the appointment of a “good, devout, God-fearing and orthodox minister,” whose salary would be paid for by the townspeople. While the Dutch Republic was far and away the most tolerant European nation, Stuyvesant himself frankly admired the relative purity of the New England colonies to the north and complained that his own comprised “the scrapings of all nations.”

The series of actions Stuyvesant took to try to prevent the Quakers from settling is almost a template for what President Trump has done to restrict Muslim immigration.

When Stuyvesant’s frank bigotry (“an abominable sect,” he termed the Quakers) was countered by reference to the Dutch principle of religious toleration, he ruled that the need to uphold “pax et concordia,” peace and harmony, overrode the toleration principle. Mr. Trump likewise shifted from blunt animus (saying during the campaign that he would “strongly consider” closing mosques in the United States) to having his solicitor general argue before the Supreme Court that the travel ban is “not a so-called Muslim ban” but was imposed in the name of national security.