Preet Bharara said Saturday he was fired "moments ago" after refusing to agree to the surprise Trump Justice Department demand that he and 45 other U.S. attorneys submit their resignations.
In a tweet, he reiterated that he did not resign his post as one of the nation's top federal prosecutors.
The afternoon announcement came less than a day after the Justice Department asked 46 holdover U.S. attorneys from the Obama administration to submit their resignations.
The Justice Department said it was not unusual for a new administration to request such resignations.
"I did not resign," Bharara said in a tweet. "Moments ago I was fired. Being the US Attorney in SDNY will forever be the greatest honor of my professional life."
Just months ago, Bharara met with Donald J. Trump at Trump Tower, and announced that the then-president-elect had asked him to stay on as the high-profile United States attorney for the Southern District of Manhattan.
Several officials familiar with the matter told NBC News that Bharara was certain Trump wanted him to stay on.
Bharara, 48, was preparing to try former aides and associates of Gov. Andrew M. Cuomo in a bid-rigging case. His office also has been investigating New York Mayor Bill de Blasio's campaign fundraising and the alleged sexting to a 15-year-old girl by disgraced former U.S. Rep. Anthony Weiner.
He also won a record $1.8 billion insider-trading settlement against billionaire Steven A. Cohen's SAC Capital Advisors, and handled major terrorism cases, including the conviction of and life sentence for Times Square bomber Faisal Shahzad.
In a statement praising Bharara for his "integrity, tenacity, and commitment to rooting out wrongdoing," Democratic New York state Attorney General Eric Schneiderman blasted Trump and Attorney General Jeff Sessions.
"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 non-partisan work will continue under Attorney General Sessions, as it must," Schneiderman said.
After receiving the order from acting Deputy Attorney General Dana Boente, Bharara told his staff he had no intention of resigning and was going to be at the office on Monday for work, sources told NBC News.
Some in law enforcement circles suggested that Bharara was essentially daring the Justice Department and the White House to fire him, according to NBC.
After his Twitter announcement, Bharara issued a statement saying, "One hallmark of justice is absolute independence, and that was my touchstone every day."
He said Deputy U.S. Attorney Joon Kim will serve as acting U.S. attorney.
Lawyers mentioned as a possible permanent replacement include Marc Mukasey, according to The New York Times. The newspaper noted that Mukasey is a former federal prosecutor in the Southern District and is now a lawyer at the New York law firm where Trump friend and advisor Rudy Giuliani works.
Bharara's announcement on Twitter came just eight days after he set up his personal account, in which he described himself as a Bruce Springsteen fan, a "Patriotic American & proud immigrant." The first tweet by the India native, on March 3, was rather ominous.
NBC News, The New York Times and Reuters contributed to this report.