Attorney General William P. Barr announced Monday that he is replacing the head of the Bureau of Prisons, marking the latest fallout from the death in federal custody of multimillionaire Jeffrey Epstein, who was accused of sex trafficking and abuse.

Hugh J. Hurwitz, the agency’s acting head, will be replaced by Kathleen Hawk Sawyer, who served as Bureau of Prisons director from 1992 to 2003.

Barr also appointed Thomas R. Kane to serve as her deputy, a position currently vacant.

The move shows how the death of a single high-profile suspect is likely to have far-reaching and long-lasting consequences for the $7 billion agency, which has operated for years in relative obscurity. Even before Epstein’s death, Justice Department officials privately expressed frustration with senior officials at the Bureau of Prisons, but the apparent management flaws found since have angered the department’s leaders, including the attorney general, according to law enforcement officials who, like others interviewed for this report, spoke on the condition of anonymity.

“I am pleased to welcome back Dr. Hawk Sawyer as the Director of the Federal Bureau of Prisons,” Barr said in a statement. “Under Dr. Hawk Sawyer’s previous tenure at the Bureau, she led the agency with excellence, innovation, and efficiency, receiving numerous awards for her outstanding leadership.”

Barr said Hurwitz would return to his previous role as an assistant director for the bureau’s reentry programs. The attorney general did not mention the Epstein case in his announcement.

Robert Hood, a retired former warden at the supermax federal prison in Florence, Colo., called Hawk Sawyer an “outstanding” choice.

“After a lot of recent instability, Kathleen Hawk Sawyer brings stability and direction,” said Hood, who has been critical of the Bureau of Prisons’ recent leadership. “She’s been a warden, she’s been a trainer, and she means business. It’s breathtaking to hear that she’s back. It’s exciting for the staff, many of whom have only heard about her. They know she’s a nuts-and-bolts person and a very direct person to work with.”

Hood predicted that Hawk Sawyer, a psychologist, will move quickly to fix a major problem at the bureau — the number of senior positions that have gone unfilled or had their responsibilities delegated temporarily.

Epstein’s death on Aug. 10 has already led to a shake-up at the federal detention facility in Manhattan where he was being held. The warden of the Metropolitan Correctional Center was reassigned, and the two guards who were supposed to be checking on his cell were placed on leave. Union officials have said that such a death was inevitable because of short staffing and the forced overtime that guards are working.

The Justice Department sent additional Bureau of Prisons personnel from across the country to buttress the MCC workforce, and a suicide reconstruction team was sent to the facility to determine exactly how Epstein died, according to a person familiar with the matter.

Critics of the Bureau of Prisons have said Epstein’s death, along with other security failures, should spur overdue changes inside the federal prison system. For example, no one has been charged in last year’s killing of Boston gangster James “Whitey” Bulger at a West Virginia prison. The bureau also was hit with a hiring freeze — since lifted — at the beginning of the Trump administration, and union officials say that MCC and many other facilities do not have enough employees to operate effectively.

Epstein, 66, was found in his cell as MCC staffers made their morning rounds. An official said he hanged himself with a bedsheet attached to the top of a bunk bed. He was taken to a nearby hospital, where he was pronounced dead.

On Friday, New York City’s chief medical examiner, Barbara Sampson, ruled that Epstein died of suicide by hanging.

“After careful review of all investigative information, including complete autopsy findings, the determination on the death of Jeffrey Epstein is below — Cause: Hanging. Manner: Suicide,” Sampson said in a short statement. She did not detail the evidence that led her to that conclusion.

Epstein’s attorneys have refused to accept the medical examiner’s findings, saying they would conduct their own “independent and complete investigation into the circumstances and cause of Mr. Epstein’s death.”

The lawyers — Martin G. Weinberg, Reid Weingarten and Michael Miller — said they were prepared to sue the government for access to any security video from the time of his death.

Meanwhile, Epstein’s last will and testament has been filed in the U.S. Virgin Islands, where he had a home. The document, first reported by the New York Post, puts Epstein’s $577 million in assets into a trust. It is unclear from the document who the beneficiaries of the trust are. Epstein signed the will just two days before his death.

Epstein had been held at the detention facility in Lower Manhattan since his arrest July 6 on sex trafficking charges. He was accused of abusing numerous teenage girls over several years in the early 2000s and had pleaded not guilty.

In a speech last week, Barr decried what he called a “failure” of Bureau of Prisons personnel to keep Epstein secure, saying he was “appalled . . . and, frankly, angry” over the incident. “We are now learning of serious irregularities at this facility that are deeply concerning and demand a thorough investigation,” he said.

That task has fallen to the FBI and the Justice Department inspector general. People familiar with the investigations have said that Epstein was left alone in a cell and that guards failed to check on him for several hours, after officials had given explicit instructions for him not to be left alone and for guards to check on him every 30 minutes.

Those precautions were in place partly because of Epstein’s apparent suicide attempt July 23, though the specifics of that incident have been debated and officials say it is still under examination.

After that incident, when staffers at the detention center found light markings on Epstein’s neck, officials placed him on suicide watch for about a week before returning him to the special housing unit, where prisoners get more scrutiny and security.

Less than two weeks later, he was dead.

Sen. Ben Sasse (R-Neb.), who has previously called for “heads to roll” at the Bureau of Prisons over Epstein’s death, called Monday’s action “a good start, but not the end.”

Sasse said the Justice Department “ought to make every effort to prosecute every one of Epstein’s co-conspirators to the fullest extent of the law.”

Barr has publicly pledged that the investigation into possible Epstein accomplices will go forward, despite his death.