Two people stop in front of a makeshift memorial at Tree of Life synagogue in Pittsburgh on Sunday, the day after a mass shooting there that the alleged perpetrator said was inspired by his hatred of Jews. (Matt Rourke/AP)

On Saturday, a shooter opened fire inside a synagogue in the heart of a heavily Jewish neighborhood in Pittsburgh. The attack occurred during Shabbat services and during a bris, a celebration of a newborn life.

Immediately before the massacre, the alleged killer tweeted about HIAS, an organization once known as the Hebrew Sheltering and Immigrant Aid Society that dates back to the late 19th century. “HIAS likes to bring invaders that kill our people,” he wrote. It doesn’t take a deep understanding of American anti-Semitism to know that to him, “our people” did not include Jewish Americans, even though Jews have lived in America since before the founding of the United States and the congregation he attacked has been convening to pray since the Civil War. (The congregation also had no particular ties to HIAS.)

Why, then, did this white-nationalist xenophobe gun down local Jews to protest HIAS? The massacre reflects a stark reality with deep roots in American history: Anti-Semitism, nativism and anti-immigrant sentiments have long been inextricably intertwined. Themselves targeted for exclusion from the country, some Jewish Americans worked through HIAS to make America more welcoming for all immigrants, making the organization a target for those blended prejudices. In Pittsburgh, as in all Jewish communities throughout time, there is no consensus among members on pressing issues such as immigration. But the synagogue wasn’t targeted because it had ties to HIAS — it was targeted because those who spew hate take it out on the most readily available Jews.

HIAS was founded in the last decades of the 19th century by Jewish communal leaders to assist Jews from Eastern Europe in making their way in the United States. Its most prominent leaders were lawyers — Max J. Kohler, Leon Sanders and Benjamin Levinson — who would go to Ellis Island to advocate for Jews who had been marked for exclusion for reasons beyond the rule of law.

While primarily focused on Jews, the organization’s commitment to aiding non-Jews in need of legal representation also quickly became evident. Understanding anti-Chinese sentiments as synonymous with anti-Jewish bigotry, Kohler repeatedly represented people of Chinese descent charged under the Chinese Exclusion Act, even arguing cases in front of the U.S. Supreme Court. HIAS thought of itself as a very American organization, visualizing and working toward a country that was welcoming and open to all immigrants.

As World War I drew to a close, Europe was faced with a massive refugee crisis. A power vacuum following the Russian Revolution and the collapse of the German and Austro-Hungarian empires led to tremendous violence, including pogroms in Ukraine in which more than 200,000 Jews were killed. Jews were among the refugees who sought safe places to live, but they found few places to go because of “wartime” limits on migration that were never lifted. As it had done before the war, HIAS came to the rescue of these hundreds of thousands of Jewish refugees.

The war spurred HIAS to become an international refugee organization as U.S. border control moved from Ellis Island to U.S. consulates abroad. HIAS came to view itself as something like an American Red Cross for Jews. The Red Cross had also begun working abroad under a broad mandate due to the war. But it was guided by American Christian thinking and closely linked with U.S. state power. By default, the Red Cross tended to serve Christians and only sporadically cooperated with Jewish organizations or made efforts to reach out to Jewish war victims.

Publicly, HIAS also cooperated with the State Department as it helped Jewish immigrant hopefuls try to arrange safe passage to the United States. But behind closed doors, HIAS lawyers frequently clashed with State Department officials and the Labor Department over the latter’s implementation of immigration policies. Further, government employees, couching anti-Semitic tropes in diplomatic language, considered Jewish immigrants “inferior” and fought to keep them out.

Why? Because anti-Semitism runs deep in the United States, and it has sinister ties to anti-immigrant sentiment. From the late 19th century onward, U.S. Public Health Service officers on Ellis Island deployed racialized conceptions of health that also led to the exclusion of Jews and other would-be immigrants. For example, favus, a scalp disease, was commonly associated with Eastern European Jews, and fears of typhus were used to justify diplomats’ exclusionary, anti-Semitic stance after World War I.

More often, immigration officers excluded Jews by determining that they were “likely to become public charges,” a rule that the Department of Homeland Security recently announced it would reinstate. The U.S. government had banned immigrants it thought would be likely to depend on charitable organizations or government programs upon entry; Congress, however, left the definition of “likely to become a public charge” undefined, thereby enabling immigration inspectors to deploy the classification at will to keep out whomever they identified as undesirable.

And so HIAS battled back as best it could.

It could not stop the tide of public opinion that fueled passage of laws in 1921 and 1924 that set explicit immigration quotas that aimed to prevent Southern and Eastern European immigration. These laws were clearly intended to keep Jews out. Sen. David Reed (R-Pa.), who sponsored the 1924 law, complained on the Senate floor about “sick and starving” Southern European and Jewish immigrants whom he viewed as “less capable of contributing to the American economy, and [less able] to adapt to American culture.”

These laws significantly limited HIAS’s capacity to help Jewish immigrants in the United States and made it nearly impossible to save Jewish refugees from Nazism a decade later.

The Holocaust did little to change anti-immigrant or anti-Jewish sentiments in the United States. In 1939, the country infamously turned away passengers on the SS St. Louis fleeing Nazi Germany, many of whom were children. Some, out of sheer desperation, resorted to illegal entry.

But HIAS persisted in its efforts to aid those who entered the United States as refugees. And in the wake of the 1965 immigration law abolishing the quota system, it expanded its services to help non-Jewish newcomers. This is why HIAS lawyers could be found at airports assisting immigrants after President Trump enacted the “Muslim ban.”

The anti-Semitism that drove the immigration policy of the early 20th century never faded from American life. Nor did its connection to anti-immigrant sentiment. These feelings are why bombs were sent this week to George Soros, often the victim of anti-Semitic caricatures, and why he has been outlandishly charged with funding the caravan of Central American asylum seekers now heading toward the United States.

And that sentiment is what compelled a shooter ranting about HIAS to massacre Jews who were part of a congregation that dates to the 1800s and is located in a city where HIAS has no offices or presence. This hateful anti-Semitic, anti-immigrant mind-set links all Jews together, conflating them wherever they are and whatever they do. As has been true throughout history, the Jews who ended up victims Saturday were simply those nearest at hand.