In this June 21, 2019 file photo, U.S. Attorney for the Eastern District of Pennsylvania William McSwain speaks with members of the media at a news conference in Philadelphia.  McSwain, the top federal prosecutor in Philadelphia announced Thursday, Jan. 14, 2021 that he will step down next week when President Trump leaves office.  (AP Photo/Matt Rourke, File) William McSwain
In this June 21, 2019 file photo, U.S. Attorney for the Eastern District of Pennsylvania William McSwain speaks with members of the media at a news conference in Philadelphia. McSwain, the top federal prosecutor in Philadelphia announced Thursday, Jan. 14, 2021 that he will step down next week when President Trump leaves office. (AP Photo/Matt Rourke, File)

US Attorney William McSwain is a Trump appointee who has sparred with Philadelphia’s District Attorney.

PHILADELPHIA — The top federal prosecutor in Philadelphia said Thursday he will step down next week when President Donald Trump leaves office.

US Attorney William McSwain, a Trump appointee, plans to return to private practice.

McSwain sparred frequently during his tenure with Philadelphia District Attorney Larry Krasner, an advocate of criminal justice reform.

McSwain pursued federal charges against Black Lives Matters activists who clashed with police during summer protests, blamed Krasner’s progressive policies for an uptick in gun violence, and fought plans for a nonprofit group to open a medically supervised drug injection site.

And he rarely minced words.

When a federal appeals court ruled this week that the proposed drug injection clinic, aimed at reducing the city’s grim rate of overdose deaths, would run afoul of federal drug laws, McSwain cheered that Philadelphia would not become “the birthplace of heroin injection sites.”

McSwain has led the office since April 2018. First Assistant US Attorney Jennifer Arbittier Williams will step into the job until President-elect Joe Biden names a replacement.