U.S. Attorney Kenneth Allen Jr., right, was among more than 40 U.S. attorneys asked by the Trump administration to resign last week. (Evan Vucci/AP)

The showdown between U.S. Attorney Preet Bharara and the Trump administration drew attention over the weekend, but the departure of 45 other top prosecutors across the country who were asked to resign Friday could substantially affect the law enforcement priorities of the offices they ran.

White House officials said they had been discussing for weeks a plan to remove the U.S. attorneys, working closely with acting deputy attorney general Dana Boente, himself a U.S. attorney for the Eastern District of Virginia.

On Friday, officials asked for all of them to tender their resignations, and every one but Bharara, who had led the prosecutors of the Southern District of New York, complied, officials said.

Although individual cases and investigations are likely to press on no matter who heads each U.S. attorney’s office, their enforcement priorities could change depending on who is at the top. Kenneth A. Polite, the U.S. attorney in New Orleans, for example, increased the number of prosecutors handling violent crime and established a public integrity unit. His successor may have other ideas.

In Baton Rouge, local law enforcement officials pleaded with Trump and Attorney General Jeff Sessions to leave in place Walt Green, the U.S. attorney for the Middle District of Louisiana, citing his efforts fighting violent crime. A Marine who served two tours in Iraq, Green created several crime-fighting units that have led to a 16 percent drop in homicides and a 22 percent reduction in violent crime since 2012, the officials said in a letter sent Sunday. Green announced Monday that he had resigned, effective the Friday before.

Those removed also included Barbara McQuade, who served 12 years as a federal prosecutor in Detroit, including a stint as deputy chief of the national security unit there, before becoming U.S. attorney. On her first day as U.S. attorney in 2010, her office arrested the “Underwear Bomber” — the al-Qaeda operative later convicted of attempting to blow up a jetliner over Detroit on Christmas Day 2009.

Another prosecutor asked to step down was John Vaudreuil, who until Friday was the U.S. attorney in Madison, Wis. Vaudreuil joined the Justice Department 37 years ago, fresh out of law school. He has been to more than 25 countries on behalf of the department, including Pakistan, Bangladesh and Russia, supporting democracy-building efforts.

“We talk about the rule of law and how we do things in a free country,” said Vaudreuil, 62. “To me, that’s a good way to fight terrorism.” Or, as he said he once quipped to a friend, “It’s easier and cheaper to send me than to send in the 82nd Airborne.”

Every presidential administration generally appoints its own U.S. attorneys, although some prosecutors were taken aback by the sudden nature of the Friday ­directive.

President Bill Clinton asked all his U.S. attorneys to resign in March 1993, but they were given time to tie up loose ends.

“I was certainly surprised and I guess a little taken aback,” Vaudreuil said. “I serve at the pleasure of the president, so I understand this, but it’s not as if I did something wrong and someone said, ‘Oh, my God, I gotta fire this guy.’ ”

Nonetheless, he was in his office Monday packing up and clearing out, handing off to an assistant U.S. attorney a case that Vaudreuil had been scheduled to try April 10. “I’ve got 38 years of knickknacks to pack up,” he said.

White House press secretary Sean Spicer said Monday that the removal of the U.S. attorneys was “standard operating procedure,’’ not just for political appointees, but for “all political appointees,” and not everyone had to leave immediately. Polite, for example, said his resignation would take effect March 24.

Richard Hartunian had been an assistant U.S. attorney 13 years before being appointed U.S. attorney in Albany, N.Y. He got his start as an assistant district attorney in Albany County in 1990 and was motivated to become a prosecutor after his younger sister was killed on Pan Am Flight 103 — the jet that was bombed over Lockerbie, ­Scotland.

Hartunian, who served on the Attorney General’s Advisory Committee, is three months from retirement. On Monday, Sessions agreed to let Hartunian stay on through June so he could complete his 20 years and be eligible for retirement. Sessions did the same for Deirdre M. Daly, the U.S. attorney in Connecticut, who will complete 20 years of service in October.

David Hickton, a former U.S. attorney in Pittsburgh who became the first to resign after Trump’s election, said it takes more than a day to be read out of a security clearance, turn in a phone and credentials, and fill out paperwork.

“There’s a distinction between having the legal right to do it and doing it the correct way — and with class,” Hickton said. “It’s just not proper to walk in there and say resign by the close of business today.’’

Mark Berman contributed to this report.