Attorney General William P. Barr on Thursday named former federal prosecutor Timothy Shea as the District’s interim U.S. attorney.

Shea, 59, currently serves as a counselor to Barr at the Justice Department. He will oversee the nation’s largest U.S. attorney’s office with 300 prosecutors.

The announcement comes just a day before Jessie K. Liu, the city’s current U.S. attorney, leaves office on Friday.

Liu, 47, has served in the post for a little over two years. President Trump on Jan. 6 nominated her to become the Treasury Department’s undersecretary for terrorism and financial crimes, and her nomination is pending before the Senate Banking Committee.

The U.S. attorney’s office in the District is unique in that it handles both local and federal cases, from violent crimes in the city to high-level national security and public corruption prosecutions.

Prosecutors there have taken to trial former Trump confidant Roger Stone and former Obama White House counsel Gregory Craig, and have taken over cases involving former Trump deputy campaign manager Rick Gates and former national security adviser Michael Flynn. They are managing a grand jury investigation into former acting FBI director Andrew McCabe, who is accused of misleading federal investigators about a media disclosure, and are handling a leak case in which they have focused at least some of their questioning on former FBI director James B. Comey. Comey and McCabe have been outspoken critics of Trump, and the D.C. U.S. attorney’s office has faced criticism that it is unfairly targeting the president’s political rivals.

In a statement, Barr described Shea’s reputation as “a fair prosecutor, skillful litigator, and excellent manager is second-to-none, and his commitment to fighting violent crime and the drug epidemic will greatly benefit the city of Washington.”

Shea has served in a variety of roles in federal and state government, including as a prosecutor in federal court in Virginia. Trump ultimately must nominate, and the Senate must confirm, a candidate to fill the U.S. attorney job.

Liu, who worked as a line prosecutor in the office decades before returning as its chief in 2017, declined to comment on her tenure or her plans. She also will require Senate confirmation for the Treasury role.

Her departure has been a source of concern from some who say the city needs a long-term top prosecutor to put in place strategies to curb crime and ensure convictions amid a rising number of homicides.

“It’s very disturbing to me there is turnover this quickly,” D.C. Council Chairman Phil Mendelson (D) said. “It’s not good for public safety not to have that stability.”

Mendelson praised Liu for working with city leaders and residents but added he was concerned that her successor may not share the same ideas of what is of importance for the District.

While overseeing federal cases, Liu also turned her attention to crime issues in the city. In early 2019, her office began taking more gun cases to federal court as part of a crackdown on repeat violent offenders and felons found illegally possessing firearms. District leaders had pushed to take these cases away from D.C. Superior Court believing sentences were often inconsistent or too lenient.

D.C. Police Chief Peter ­Newsham described Liu as a “really good partner” to the department, but echoed Mendelson about his concerns of a new U.S. attorney taking over as law enforcement work to identifying new approaches to reduce violence. “There is something to be said for consistency,” Newsham said. “Unfortunately, we’re going to have to start all over again with a new leader.”

On Thursday evening, D.C. Mayor Muriel E. Bowser (D) said Shea had contacted city officials, and they plan to meet in the coming days. Bowser said she hopes Shea will keep some of the initiatives that Liu put in place, including pursuing gun cases in federal court. “He is already on board,” Bowser said. “We want to make sure he recognizes the context of how the U.S. attorney’s offices and annexes work together for a stronger D.C.”

Liu oversaw myriad high-profile cases. It was her call last year to dismiss charges against 188 defendants who were charged with rioting during Trump’s 2017 inauguration. Nearly two dozen defendants pleaded guilty; prosecutors were unable to secure convictions at trial in other cases.

Liu’s office last year also petitioned a federal court judge to seek the early prison release for 1980s D.C. drug kingpin Rayful Edmond III after he spent decades cooperating with authorities.

Liu became most visible in the community when she clashed with some city council members over a proposed amendment to a D.C. law that would grant additional inmates convicted of serious crimes a chance at early release.

That law, the Incarceration Reduction Amendment Act, allows people who committed crimes as juveniles a chance to petition for release after serving 15 years in prison. The proposed amendment, sponsored by D.C. Council member Charles Allen (D-Ward 6), would expand the group of eligible inmates to include those who were as old as 24 when they offended, as opposed to age 17.

The amendment was originally planned for a council vote last fall. Allen spokesman Erik Salmi said the measure was “not dead,” but no date for a vote has been determined.

Liu came under criticism for the handling of hate-crime prosecutions, with community leaders saying her office failed to aggressively prosecute such cases and pursue enhanced penalties when authorities said they believed the victim was targeted because of race, sexual orientation or religion.

Del. Eleanor Holmes Norton (D-D. C.) said she repeatedly tried to convince Liu to address a rise in hate-crime arrests in the city, but prosecutions were stagnant.

Norton, who has represented the nation’s capital since 1991, described Liu being “at the bottom of the list” in terms of quality among the U.S. attorneys with whom she has worked.

“As she moves on, it seems clear she never wanted this position in the first place and appeared to be using this job to move onto to where she is moving to now within the administration.”

Liu previously was nominated by Trump for the No. 3 position in the Justice Department, but she withdrew from consideration in March after Republican senators raised concerns about her past membership in a lawyers group that supported abortion rights.

Karl A. Racine, the District’s first elected attorney general, said he disagreed with some of Liu’s decisions such as moving more firearm crimes to federal court. But they had common ground on other issues.

When he expressed concern over an increase in fraud cases involving elderly victims, Racine said, Liu allowed one of his local prosecutors to team with her office on such investigations.

“I had an enthusiastic partner in Jessie,” Racine said.

Peter Hermann and Eddy Palanzo contributed to this report.