CHARLESTON, S.C. — After what she described as intense and emotional discussions with family members and survivors, one of the state’s top prosecutors said Thursday that she would seek the death penalty for Dylann S. Roof, who is charged with committing racially motivated murder against nine members of a storied church here.

A lone gunman walked into the historic Emanuel African Methodist Episcopal Church in downtown Charleston on June 17, and sat in a Bible study session for almost an hour before drawing a .45-caliber semiautomatic handgun and shooting people ranging in age from 26 to 87.

Mr. Roof has been indicted twice for the killings, in state court and in federal court, and each of the cases carries a possible death sentence. Until the court filing on Thursday by Scarlett A. Wilson, the South Carolina state solicitor overseeing the case, neither set of prosecutors had said publicly whether they would seek to have him executed, but state officials, including Gov. Nikki R. Haley, have said emphatically that the case warranted the death penalty.

The documents said that Mr. Roof, 21, “knowingly created a great risk of death to more than one person in a public place, by means of a weapon,” and that he had killed more than two people — criteria sufficient to invoke the death penalty.