President Obama’s landmark immigration executive order announced Nov. 20 is expected to impact the lives of millions — very few of whom will be Jewish.

Nevertheless, a number of Jewish groups greeted the new policy, which offers protection to some 5 million undocumented immigrants, with excitement. In the United States, Jews have been both the subject of exclusionary immigration policies as well as the leaders to liberalize those laws.

In the 1920s, after decades of relatively loose immigration laws had enabled more than 2 million Eastern European Jews to settle in the U.S., Jews fought an effort to close the gates to the “goldene medina.” The Immigration Act of 1924, a bill advanced by a notoriously racist Republican congressman named Albert Johnson, enacted a quota system that would severely limit Jewish immigration and totally exclude immigrants from Asia.

Jewish leaders staunchly opposed the bill, with JTA reporting “militant action against” it. The United Hebrew Trades, an association of Jewish labor unions in New York, brought together 136 Jewish organizations in order to “wage a nationwide campaign to defeat” the bill.

Jewish efforts concerned Johnson, who responding to an inquiry by a JTA correspondent replied coldly: “If the Jewish people combine to defeat the immigration bill as reported by the [Immigration Committee of the House of Representatives], their children will regret it.”

Nonetheless, the bill passed with ease, and its devastating effects — reducing Jewish immigration from hundreds of thousands annually to less than 15,000 per year — were fully on display in 1939 when refugees, most notably a group of 907 German Jews aboard the S.S. St. Louis, were refused entry.

The law remained largely intact until the 1952 McCarran-Walter Act, which sought to uphold the previous quota system. The measure was deemed racist and exclusionary.

Jewish groups condemned the bill. JTA reported that “all major Jewish groups” spoke out against the act, warning that it would “abandon our country’s finest traditions by dropping an iron curtain around our shores.” Despite an executive veto from President Harry Truman, the measure passed overwhelmingly in Congress.

In 1965, an immigration bill arrived that Jewish groups could support. The Hart-Cellar Act sought to dismantle the quota system in place since 1924 and finally opened the doors to Asian, African and Middle Eastern populations. Although Jews, with Israel available, no longer needed the open doors, major Jewish groups still rushed to support the bill. In a joint statement, seven national Jewish groups, including the American Jewish Congress and the Conservative movement’s United Synagogue of America, called the bill a “long overdue” change to the quota system that had “defaced our immigration policy and mocked our national protestations of equality.”

Perhaps the most impassioned plea, however, came from a Jewish New York congressman named Leonard Farbstein, who told the House that the act would come too late for the Jews “buried in mass graves at Auschwitz, Dachau and Bergen-Belsen” who were denied U.S. visas.

But, Farbstein said, the new law would allow those murdered Jews to “rest easier in their graves” because America may now provide an easier haven to refugees.