The “sanctuary city” of Philadelphia and a New York-based justice institute outlined a plan Tuesday to provide lawyers for undocumented immigrants facing deportation — a key factor in whether they can stay in the United States and fight in the courts, or are quickly shipped out of the country.

Both pledged to provide a total of $200,000 in immediate funding, and hope to raise more money from other groups and local governments.

The project will help Philadelphia “remain a place where everyone, including immigrants, feels safe and welcome,” and “push back on the hate being driven by the White House,” Mayor Jim Kenney said during the announcement at the National Constitution Center.

He was joined by Vera Institute of Justice leaders, City Councilwoman Helen Gym, State Rep. Chris Rabb, and about two dozen legal activists and immigrant-rights workers — and a lone protester, who questioned why people who entered the country without permission deserve any legal representation in its courts.

“If you’re deported or detained, you’re illegal,” said Jeff Ventura, 33, who brought a hand-written sign that condemned illegal immigration.

The collaboration with Vera represents another big step in the Kenney administration’s efforts to treat undocumented migrants and U.S. citizens alike when they interact with courts and police. Philadelphia is home to about 50,000 undocumented migrants, part of a national population estimated at 11 million.

It comes at a moment when emerging coalitions of political figures, university scholars, immigration advocates, and philanthropic organizations are pushing for a public defender-like system to represent poor immigrants facing deportation to what are often dangerous countries.

“Our goal is to change the fundamental power imbalance that too many immigrants face right now,” Gym said at the Constitution Center.

The right to a lawyer may seem like a standard component of U.S. law, particularly when one’s liberty is at risk, but defendants in Immigration Court generally do not have the right to court-appointed counsel, and even young children can be forced to serve as their own lawyers.

The project announced Tuesday expands Vera’s two-year-old SAFE network, an acronym for Safety and Fairness for Everyone. It seeks to ensure that migrants have legal representation, much like the public-defender system in criminal courts.

In the SAFE program’s first year, 38 percent of those represented by lawyers were able to remain in the U.S. while their cases went forward. By comparison, only about 3 percent of those without attorneys were successful, according to the institute.

“The SAFE Network means that everyone at risk of deportation should have access to due process and a fair day in court,” the institute said in a statement.

But Immigration Court is not like other courts. The vast majority of migrants are forced to defend themselves during removal proceedings, at which they may not even understand the language.

At the top of the Immigration Court system is the attorney general, a political appointee who has the power to issue binding decisions on how the trial judges should operate. Those judges have little discretion, and in some situations cannot even end proceedings in a case without approval from ranking government lawyers.

SAFE currently operates in 12 cities and counties, and now is expanding not only to Philadelphia but to Dallas, San Francisco, New Haven, Long Beach, Calif, and Ramsey County, Minn., which includes St. Paul.

“We want to be in every single place,” said Kica Matos, director of the institute’s Center on Immigration and Justice.

The dramatic impact of having legal representation was made clear in a 2015 University of Pennsylvania Law Review study, which examined more than 1.2 million deportation cases decided between 2007 and 2012.

Only 37 percent of all immigrants, and 14 percent of detained immigrants, had access to legal representation. Lawyers were particularly hard to find in rural areas and small cities, where almost a third of detained cases were decided, the study said.

The outcomes for those with lawyers were undeniably more favorable: Among similar cases, the odds were 5½ times greater that migrants with lawyers could obtain relief from removal.

The court system benefited, too, the Penn study said.

Those with counsel brought fewer frivolous claims, were more likely to be released from custody, and once released were more likely to appear at their future deportation hearings.

“What we’re fighting for is so overdue,” said Cathryn Miller-Wilson, executive director of the immigrant-advocacy group HIAS-PA, “and so fundamental to us as Americans.”