A prominent US prosecutor said the Trump administration fired him on Saturday after he refused to step down, adding a discordant note to what is normally a routine change of top lawyers when a new president takes office.

New York US Attorney Preet Bharara's defiant exit, first announced on Twitter, raised questions about President Donald Trump's ability to fill top government jobs.

Trump has yet to put forward any candidates to serve as the nation's 93 district attorneys, even as the justice department asked the 46 who have not yet quit to hand in their resignations on Friday. Key positions at agencies such as the state department and the defence department also remain unfilled.

As the federal prosecutor for Manhattan and surrounding areas since 2009, Bharara secured insider-trading settlements from Wall Street firms and won criminal convictions in high-profile cases.

WATCH: Is Donald Trump about to lose his attorney general?

He told reporters in November that Trump had asked him to stay in his post, and he refused to resign when asked to do so by the justice department on Friday. He said he was fired on Saturday afternoon.

"Serving my country as US attorney here for the past seven years will for ever be the greatest honour of my professional life, no matter what else I do or how long I live," Bharara said in a press statement.

The justice department confirmed that Bharara was no longer serving in the position and declined further comment.

Like all US attorneys, Bharara is a political appointee who can be replaced when a new president takes office. Previous presidents have often asked outgoing US attorneys to stay on the job until their replacements win confirmation in the US Senate.

The Washington Post, citing two people close to Trump, said the president's adviser Stephen Bannon and Attorney General Jeff Sessions wanted a clean slate of federal prosecutors to assert the administration's power.

But the decision to replace so many sitting attorneys at once has raised questions about the Trump administration's ability to enforce the nation's laws.

"President Trump's abrupt and unexplained decision to summarily remove over 40 US attorneys has once again caused chaos in the federal government," said New York Attorney General Eric Schneiderman, a Democrat.

Senator Patrick Leahy, a Democrat on the Senate Judiciary Committee, said the firings showed that "the independence of the justice department is at risk under this administration" and that politicians had to carefully evaluate Trump's replacements.

Career attorneys will cover the work until new US attorneys are put in place, the justice department said.

Bharara said his deputy, Joon Kim, will serve as his temporary replacement.