United States attorneys serve at the pleasure of the president. Here’s hoping that it is the pleasure of President-elect Donald J. Trump to keep junkyard-dog federal prosecutor Preet Bharara on the job long enough to finish the extraordinary work he has undertaken in New York.

Custom has it that US attorneys stand ready to depart when a new president is inaugurated. Bill Clinton, taking office in 1993, demanded — and received — resignation letters from all 93 federal prosecutors. New brooms, as they say, sweep clean. Bharara, if not a new broom, is certainly a big one, and he’s been sweeping clean since President Obama — on the recommendation of Sen. Charles Schumer — appointed him US Attorney for the Southern District of New York in 2009. That’s one of the most challenging prosecutorial posts in the federal government, albeit one that has generally focused on Wall Street and the financial markets. Bharara widened the brief to include New York government at the state and local level — scoring spectacular, if substantially incomplete, results.

Former New York Assembly Speaker Sheldon Silver and one-time state Senate Majority Leader Dean Skelos are on their way to federal prison; former key aides to Gov. Cuomo await formal indictment in separate scandals; and New York City Mayor Bill de Blasio’s administration has been hamstrung by at least five investigations — most of them conducted, initiated, or materially aided by Bharara.

Not since Manhattan District Attorney Thomas Dewey went after Tammany Hall to splendid effect some 80 years ago has a single prosecutor had the effect on political corruption in New York that Bharara has already achieved. Yet for all of that, much remains to be done, with not much time to do it if standard succession conventions are observed.

New York will never be free of corruption. Greed, stupidity, and arrogance are part of the human condition — arguably nowhere more acutely than in the Empire State. Bharara’s singular service to date has been to impose a measure of restraint on business as usual.

Going forward, rare will be the gathering of politicians and other players where the folks at the table won’t wonder who among them is wearing a wire. And that is all to the good in a state known for its political culture of corruption.

De Blasio is heading into his re-election year, with Cuomo presumably to follow in 2018. For better or worse, each deserves unequivocal conclusions to the investigations and related activities that Bharara has initiated.

The prosecutor needs to drop the hammer or lift the cloud, to be blunt. And New Yorkers need a clean resolution also, for otherwise, a restoration of confidence in their government is impossible.

For any of that to happen, Bharara needs time and support. Questions loom, not least among them this: Will the new US attorney general — whoever that might be — provide Bharara that time and support? Any president-elect has a lot on his plate. Given the circumstances, President-elect Trump likely has more distractions than most.

But he is a New Yorker; he can’t help but understand what’s at stake. He can do his hometown — and the rule of law — a substantial favor by extending Preet Bharara’s tenure.

Bob McManus is a contributing editor at the Manhattan Institute’s City Journal, where this piece first appeared.