Preet Bharara, the Manhattan federal prosecutor who was told to submit his resignation along with 45 others on Friday, was fired after refusing to resign Saturday.
Mr. Bharara tweeted, “I did not resign. Moments ago I was fired. Being the US Attorney in SDNY will forever be the greatest honor of my professional life.”
Mr. Bharara, whose office is overseeing a case against a top aide to Gov. Andrew M. Cuomo and an investigation into people close to Mayor Bill de Blasio of New York City, has told several people that he did not hand in a resignation on Friday, as he was ordered to do by the acting deputy attorney general, Dana Boente.
A spokesman for Mr. Bharara declined to comment.
Mr. Bharara was asked by Mr. Trump to remain in his current post in a meeting in late November, a few weeks after the presidential election. Mr. Bharara met with Mr. Trump at Trump Tower, and then addressed reporters afterward, saying that he had been asked to remain and had given the president his promise to do so.
But Mr. Bharara was one of the 46 holdovers from the Obama administration who abruptly received a call on Friday telling him to vacate.
Officials with the White House and the Department of Justice did not respond to requests for comment about how they plan to handle Mr. Bharara.
One of New York’s top elected Republicans voiced support for Mr. Bharara on Saturday.
“Good for Preet, he is doing the job he was appointed to do!” Assemblyman Brian M. Kolb, the State Assembly minority leader, wrote on Twitter.
Assemblyman Steven F. McLaughlin, a Republican who was fond of calling for draining the swamp in Albany long before Mr. Trump embraced that expression, had urged Mr. Trump and Attorney General Jeff Sessions to reconsider on Friday.
“Big mistake,” he wrote on Twitter.
The Southern District for New York, which Mr. Bharara has overseen since 2009, encompasses Manhattan, Mr. Trump’s home before he was elected president, as well as the Bronx, Westchester, and other counties north of New York City.
Mr. Trump last weekend accused former President Barack Obama of wiretapping Trump Tower in Manhattan, an allegation he has yet to back up.
But federal investigators have been examining whether there was a connection between Russian officials and the Trump campaign. Intelligence officials believe that the hacking of emails belonging to the Democratic National Committee and campaign officials for Hillary Clinton was orchestrated by the Kremlin.