High profile U.S. Attorney Preet Bharara in Manhattan refused to resign and was fired Saturday, prompting some lawmakers to criticize the Trump administration’s move sweeping Barack Obama appointees out of the Justice Department.

Bharara, 48, first announced the action on his personal Twitter account.

“Today I was fired from my position as U.S. Attorney,” he said later in a statement. “One hallmark of justice is absolute independence, and that was my touchstone every day that I served.”

Attorney General Jeff Sessions on Friday demanded Bharara’s resignation along with 45 other federal prosecutors appointed by Obama. Robert Capers, the U.S. attorney for the Eastern District, which includes Long Island, immediately resigned.

One exception was Maryland U.S. Attorney Rod Rosenstein, who served during both Obama terms after being appointed by President George W. Bush. Rosenstein is Trump’s nominee for deputy attorney general.

Bharara drew praise from New York representatives for his work rooting out government corruption and organized crime.

advertisement | advertise on newsday

New York Attorney General Eric Schneiderman criticized Republican Trump for forcing out Bharara and other effective U.S. attorneys.

“President Trump’s abrupt and unexplained decision to summarily remove over 40 U.S. Attorneys has once again caused chaos in the federal government and led to questions about whether the Justice Department’s vital and nonpartisan work will continue under Attorney General Sessions, as it must,” Schneiderman said in a statement.

Bharara said he had received assurances in late November from both the president-elect and Sessions that they wanted him to stay on, and he agreed to do so. It wasn’t immediately clear what prompted Trump to change his mind.

Sen. Chuck Schumer (D-N.Y.), who urged Obama to appoint Bharara in 2009, had asked Trump to allow the prosecutor to continue serving in New York’s Southern District.

On Saturday, Schumer praised Bharara but stopped short of criticizing Trump.

“Preet Bharara has been an exemplary U.S. attorney,” Schumer said in a statement. “His relentless drive to root out public corruption, lock up terrorists, take on Wall Street, and stand up for what is right should serve as a model for all U.S. attorneys across the country. He will be sorely missed.”

State Sen. Todd Kaminsky (D-Long Beach), a former federal prosecutor in Brooklyn who advocated for state ethics reforms, said Bharara was never partisan in bringing state government corruption cases “that shook Albany to its core.”

“Playing politics with the Justice Department should scare all of us, and it is impossible to square the abrupt firing of corruption fighters like Bharara with wanting to ‘drain the swamp.’” Kaminsky said. “This will leave a gaping void and we cannot allow progress to come to a halt.”

advertisement | advertise on newsday

It is not uncommon for a new administration to change out U.S. attorneys, but the sweeping changes ordered Friday caught many officials off-guard.

Bharara’s firing comes just days after a group of ethics watchdogs sent a letter to him urging an investigation of whether Trump’s business interests violate the U.S. Constitution’s Emoluments Clause, which bars federal officials from receive money from foreign states.

The letter was sent Wednesday by Citizens for Ethics and Responsibility in Washington, Democracy 21, the Campaign Legal Center, and former presidential ethics advisers Norman Eisen and Richard Painter.

Bharara declined to comment at the time. Trump Organization attorney Alan Garten called the letter legally erroneous and inaccurate, and politically motivated.

Bharara had upended much of New York State politics with corruption convictions of former Assembly Speaker Sheldon Silver, a Democrat, and former Senate Republican leader Dean Skelos.

advertisement | advertise on newsday

A one-time top aide to Gov. Andrew M. Cuomo, Joseph Percoco, is expected to go on trial this year, and New York City Mayor Bill de Blasio’s fundraising tactics have been under investigation for a year.

Bharara’s chief deputy, Joon H. Kim, will serve as acting U.S. Attorney until a new appointee is confirmed.

With John Riley