U.S. Attorney William McSwain on Wednesday invoked the memory of President Abraham Lincoln to compare Philadelphia Mayor Jim Kenney and District Attorney Larry Krasner to slaveholders who sparked the Civil War and Southern segregationists who opposed civil rights.

His reasoning? Kenney and Krasner support a “sanctuary city” policy in immigration matters, as well as legal supervised injection sites for opioid users — in contravention of what McSwain cited as the supremacy of federal law.

“What an amazing concept,” McSwain told about 500 people gathered for lunch at the Union League’s annual Lincoln Day celebration. “It’s one that would have elated those who opposed the desegregation of lunch counters. Or those who told Rosa Parks to go to the back of the bus. Or those who stood in the schoolhouse doorway to prevent African American children from entering. And this concept would have absolutely thrilled Southern slave owners, a sanctuary from federal law where they can continue their practice of human bondage.”

McSwain praised Lincoln and the Union Army that won the Civil War, before suggesting that fight goes on.

“The secessionists who fled Union authority during our national Civil War may be gone, but they are not forgotten,” he said. "They did not fight in vain. No, their mind-set and their spirit live on right here in Philadelphia, in the cradle of liberty. Their spirit lives on in the hearts and minds of those who would make our city a sanctuary city.”

Sanctuary cities decline requests from federal agencies to detain people who are in the United States illegally but scheduled to be released from jail, unless the agency seeks a warrant from a judge. Supervised injection sites offer places where opioid users can inject drugs, surrounded by offers of treatment for addiction and medical assistance to prevent overdoses.

McSwain received a standing ovation from the crowd after his speech but declined to comment about the escalation of his rhetoric in an ongoing conflict with Kenney and Krasner.

In a statement, Kenney noted that federal judges have sided with the city on the policies McSwain complained about. Kenney aimed higher up the power chain, at McSwain’s bosses, President Donald Trump and U.S. Attorney General William Barr.

“Thousands of children remain separated from their families because of the policies of the Trump Administration, and yet Mr. McSwain’s boss, the Attorney General, continues to further politicize the Department of Justice and degrade our democracy by doing the personal bidding of the President,” Kenney said. “And how dare Mr. McSwain, of all people, invoke the name of a true American hero like Rosa Parks and others who fought against racial injustice, when everyday he crusades for a President who personifies racism and bigotry.”

Krasner spokesperson Jane Roh touted the “dedicated prosecutors” in her office and said “targeting undocumented people for deportation” does not improve safety in the city.

“We do not have time to engage in slap fights with a Trump appointee whose desperate attempts to make a name for himself get more bizarre by the day,” Roh said in a statement. “We are proud to serve a city of immigrants in a nation of immigrants. Any public official who does not share these Philly values should do us all a favor and leave.”

McSwain has previously accused Krasner of enabling violent crime in the city and knocked Kenney for the release from jail of a man in the country illegally, even after a federal agency obtained a warrant.

McSwain, who quoted extensively in his speech from addresses Lincoln made in 1863 at Gettysburg and in 1838 at Lyceum, also lamented the city’s history of political corruption, including three currently imprisoned politicians: former U.S. Rep. Chaka Fattah, former District Attorney Seth Williams, and former Sheriff John Green.

He also cited two City Council members — Bobby Henon and Kenyatta Johnson who are still on the job while under federal indictment, facing corruption charges.

“Our mayor’s reaction to this is complete indifference,” McSwain said of the indictments. “But the City Council president reaction to this was even worse. [Darrell Clarke] has rewarded both of these councilmen with a promotion, handing them plumb committee assignments and chairmanships.”

Clarke last month said, “The lineups in terms of committees were assigned based on, one, an individual’s willingness to serve, and, two, their ability to serve.”

McSwain, a Republican, made no mention of political parties in his speech. The elected officials he criticized are all Democrats.