For months, New York City Mayor Eric Adams — a former cop — refused to criticize the federal authorities investigating his administration.

Not anymore.

The day news of his indictment on corruption charges broke, Adams defiantly suggested, without providing evidence, that U.S. prosecutors had gone after him because he had criticized President Joe Biden’s immigration policies.

“Despite our pleas, when the federal government did nothing as its broken immigration policies overloaded our shelter system with no relief, I put the people of New York before party and politics,” he said. “I always knew that if I stood my ground for all of you, that I would be a target — and a target I became.”

The accusation from Adams marked a sharp turn for a retired police captain turned politician, whose commitment to law-and-order has been a calling card during his time in office.

The rhetoric was also similar to that of other politicians who have found themselves facing various accusations.

After he was indicted on corruption charges by the same U.S. attorney prosecuting Adams, former U.S. Sen. Bob Menendez blamed his prosecution on “forces behind the scenes” that had “repeatedly attempted to silence my voice.”

Former President Donald Trump blamed the lawsuits and criminal charges against him on a political “witch hunt” orchestrated by Democrats.

Adams echoed some of that rhetoric after he was charged with accepting illegal campaign contributions and free travel perks from Turkish officials and businesspeople looking to buy his influence.

He suggested prosecutors had been told to smear him. By who, he didn’t say.

“We should ask them, ‘Who gave the directive to carry out what we have witnessed over the last 10 months?’” Adams told reporters.

The White House has pushed back on the idea that Adams was targeted because of his complaints about not getting enough help from the federal government dealing with an influx of international migrants.

White House press secretary Karine Jean-Pierre told reporters the administration had nothing to do with the Department of Justice’s decision to bring charges.