Philadelphia’s newly minted district attorney is already fulfilling one of his more controversial campaign promises.

On Thursday, Larry Krasner will announce the creation of a new position within his office that will focus exclusively on protecting immigrants' rights.

“So often the consequences of being charged for crimes is deportation,” Krasner spokesman Ben Waxman said. “We want to make sure the assistant DAs are aware of those consequences and factor it into their thinking.”

In other words, Krasner’s appointee would be in charge of ensuring that a foreign national would not be deported over, say, a traffic violation.

“No one thinks that would be appropriate,” Waxman said.

The position is modeled after a similar effort pioneered by Brooklyn District Attorney Eric Gonzalez.

In April, Gonzalez’s office hired two immigration attorneys to train all staff on immigration issues and advise prosecutors when making plea offers and sentencing recommendations.

“Now, more than ever, we must ensure that a conviction, especially for a minor offense, does not lead to unintended and severe consequences like deportation, which can be unfair, tear families apart and destabilize our communities and businesses,” Gonzalez said at the time.

In a New York Times interview, Gonzalez, a longtime veteran of the New York criminal justice system, said targeting immigrants for deportation only weakens law enforcement’s ability to work with those communities. Witnesses and victims are less likely to come forward when a crime is committed, he said.

Gonzalez’s statement seemed to echo - in sentiment - Philadelphia Mayor Jim Kenney’s own defense of the city’s “welcoming" status. He has repeatedly called for city employees, especially police, to not question a person’s citizenship, but insists on not using the term "sanctuary city."

Spearheaded by Kenney and City Solicitor Sozi Pedro Tulante, Philadelphia filed a lawsuit last year against U.S. Attorney General Jeff Sessions after he imposed new restrictions on federal grant money for sanctuary cities.

The Department of Justice called the lawsuit "a disservice" to Philadelphia by "protecting criminal aliens rather than law-abiding citizens."

Several months later, United States District Court Judge Michael M. Baylson granted a preliminary injunction against the DOJ. But Sessions filed an appeal earlier this week, setting the stage for a continued fight over sanctuary cities.