Philadelphia was founded as a sanctuary city. And Philadelphians have sought to protect our most vulnerable residents from violence and persecution for centuries. As City Council considers legislation meant to resist the Trump administration’s mass deportation campaign, it is worth reminding ourselves of this history and why protecting our neighbors matters for all of us.

When kings, presidents, and other authorities have pursued violence and oppression, Philadelphians — and sometimes our local government — have resisted.

The meanings of sanctuary have changed over time, yet the moral commitments behind it have remained remarkably consistent. In the 1680s, William Penn and fellow Quakers established Pennsylvania as one of the few territories in the New World where people of all religions were welcome. Unlike other colonial cities, Philadelphia was built without defensive walls, a place designed to live in peace with its neighbors.

This aspiration surely contradicted many realities, including for Native Americans and enslaved Africans. But Philadelphia did become the largest and most culturally diverse city in colonial North America thanks to its official tolerance of different peoples.

In 1688, a group of Quakers in Germantown penned the first petition against slavery in the English colonies. Greater Philadelphia became a leading center of abolitionist movements in the ensuing centuries. From Lawnside and Medford in New Jersey, to Darby, Kennett, and Quakertown in Pennsylvania, Black and white residents of our region sheltered people escaping slavery via the Underground Railroad.

Across the 19th and 20th centuries, members of newcomer and receiving communities helped protect people targeted by racial and ethnic violence, sometimes in opposition to public policies of racial exclusion and deportation. These included Irish immigrants attacked in anti-Catholic riots of the 1840s; Chinese Americans targeted under the Chinese Exclusion Act (1882-1943); African Americans fleeing the Jim Crow South; and Italians and other European immigrants whom other Americans did not consider fully white.

In 1882, Philadelphians established the Association for the Protection of Jewish Immigrants (today HIAS-PA) to help people like my ancestors who fled pogroms in Poland, Ukraine, and other parts of the Russian Empire. In 1917, Quakers in Philadelphia founded the American Friends Service Committee, which helped rescue and welcome refugees from World War I and subsequent wars. During World War II, Philadelphia became the first major East Coast city to welcome Japanese American students to continue their education while the federal government interned their families.

In the 1980s, Philadelphia’s Civil Rights and interfaith movements helped make our region an important center of the Sanctuary Movement. Eleven congregations in West and Northwest Philadelphia, Fox Chase, Wayne, Media, Southampton, and Concord harbored people fleeing genocide in El Salvador and Guatemala — even as the United States denied over 98% of their asylum claims for reasons of politics, not refugee law.

» READ MORE: Officials should be ready to protect Philadelphia from Trump’s immigration overreach | Editorial

Thirty-seven other congregations supported this hospitality. Sanctuary activists took journalists and public officials to Central America to witness the brutality supported by our government. They convinced U.S. Sen. Arlen Specter and other politicians to help end U.S. support for that violence and change asylum policy for people from Central America and Haiti, where the U.S. had supported the murderous Duvalier dynasty for decades.

By 1987, two states and 24 cities and towns across the country, including Allentown and Swarthmore, had sanctuary policies. But Philadelphia activists who launched a sanctuary city campaign in 1986 abandoned their effort. At the time, there were very few Central Americans living in the city, they reasoned, and few immigrants overall.

In the 21st century, Philadelphia’s sanctuary policy matters far more, as the city and region have become home to people from around the world. Immigrants are our neighbors, members of every community across our region. They are a boon — not a threat — to our peace and prosperity. The overwhelming evidence shows that immigrants make cities safer and economically vital.

In May 2001, Mayor John F. Street issued Philadelphia’s first sanctuary policy in response to federal pressure to enter an agreement for local police to collaborate in immigrant detention and deportation. Since 2007, Philadelphia has been a major center of the New Sanctuary Movement. In 2014, activists convinced City Council to make the city’s sanctuary policy one of the strongest in the nation. Mayor Michael Nutter canceled this policy in his last weeks in office, but Mayor Jim Kenney signed it back into force on his first day in 2016.

» READ MORE: Quakertown police mimic ICE brutality | Editorial

The Kenney administration successfully defended the policy against the first Trump administration, affirming that sanctuary policies are constitutional since cities cannot be obligated to do the federal government’s job, including immigration enforcement. To remain legal, though, sanctuary city policies are always passive, offering limited protection, as local authorities may not actively stand in the way of federal agencies like U.S. Immigration and Customs Enforcement.

It remains unclear how far Mayor Cherelle L. Parker might go to defend immigrants in our city. This is one reason why City Council’s ICE Out legislation, which was given preliminary approval Monday, is necessary. The Trump administration is seeking to dismantle virtually our entire immigration system. Even people who came to the United States as refugees, often fleeing places where U.S. intervention decimated their homes and livelihoods, are at risk.

As Philadelphians have long demonstrated, organized communities and local government policies can carve out meaningful sanctuary for the vulnerable among us, regardless of who occupies the White House.

“Both the United States and the City of Philadelphia have for centuries served as a haven for refugees of religious and political persecution from all parts of the world, and much of the historical and moral tradition of our nation is rooted in the provision of sanctuary to persecuted peoples.” These words come from a draft sanctuary city bill written for City Council by Sanctuary Movement activists in 1986. The bill never reached City Hall, but its words describe an enduring tradition that is in our city’s DNA.

On our nation’s 250th birthday, it is worth reflecting on the freedoms we enjoy along with the freedoms that remain unrealized for many of us.

Ultimately, sanctuary matters for all of us, if we wish to remain a humane city and society. Virtually all Philadelphians descend from people who came to America within the last few centuries, through voluntary or forced migration. But sanctuary is an ancient tradition, enshrined in the Bible. Honoring this tradition is a crucial way to recognize all of us, in the words of one Philadelphia sanctuary activist, “as one humanity.”

Domenic Vitiello is professor of city planning and urban studies at the University of Pennsylvania. His book, “The Sanctuary City: Immigrant, Refugee, and Receiving Communities in Postindustrial Philadelphia,” is free to download as an ebook.