But Ms. Lynch chose to seek the death penalty after a contentious review process that included South Carolina’s top federal prosecutor siding with Mr. Roof’s defense lawyers in their offer of a guilty plea in exchange for a life sentence. Ms. Lynch said that “the nature of the alleged crime and the resulting harm compelled this decision.”

In a court filing the same day the attorney general made her decision public, the Justice Department cited nine aggravating factors, including that Mr. Roof had “expressed hatred and contempt towards African-Americans, as well as other groups, and his animosity toward African-Americans played a role in the murder charges in the indictment.”

Prosecutors also said that Mr. Roof had “demonstrated a lack of remorse” and that he had caused “injury, harm and loss to the individuals that he killed as well as to the family, friends and co-workers of those individuals.”

The Justice Department declined to comment further for this article.

Although Ms. Lynch’s decision capped a process formally shrouded in secrecy, it was an unsurprising one to observers like Ms. Risher, who said she had felt as early as last December that prosecutors would seek the death penalty in one of the highest profile criminal matters before the Justice Department.

The case’s prominence influenced Ms. Lynch’s decision, according to people with knowledge of the Justice Department’s review, and some federal officials worried that forgoing the death penalty would effectively curb the government’s options in future cases with lower fatality counts and less public scrutiny. Some of the people insisted on anonymity to discuss a confidential process.

“I think what the federal government did is what the federal government thought it had to do, which was speak on behalf of the nation,” Mr. Savage said. “I was always told, ‘Well, Andy, if we don’t move for the death penalty in this case, when would we?’”