CHARLESTON, S.C. — Dylann Roof was convicted Thursday in the chilling slaughter of nine black church members who had welcomed him to their Bible study, a devastating crime in a country that was already deeply embroiled in racial tension.

The same federal jury that found the defendant guilty of all 33 counts will reconvene next month to hear more testimony and weigh whether to sentence him to death. As the verdict was read, the defendant just stared ahead, much as he did the entire trial. Family members of victims held hands and squeezed one another’s arms.

The defendant, 22, told FBI agents he wanted to bring back segregation or perhaps start a race war with the slayings. Instead, the single biggest change to emerge from the June 17, 2015, killings was the removal of the Confederate flag from the South Carolina Statehouse, where it had flown for 50 years over the Capitol or on the grounds. The shooter appeared with the flag in several photos in a racist manifesto.

The shooting happened just months after Walter Scott, an unarmed black man, was killed by white police officer Michael Slager when he fled a traffic stop in North Charleston. Police shootings around the county have heightened tensions between black communities and the law enforcement agencies that patrol them, sometimes resulting in protests and riots.

In the defendant’s confession to the FBI, the gunman said he carried out the killings after researching “black on white crime” on the internet. He said he chose a church because that setting posed little danger to him. He told the judge again Thursday that he wanted to act as his own attorney during the penalty phase. He will also face a death penalty trial in state court on nine murder charges.

In closing arguments, Assistant U.S. Attorney Nathan Williams mocked the defendant for calling himself brave in his hate-filled journal and during his confession, saying the real bravery came from the victims who tried to stop him as he fired 77 bullets at Emanuel African Methodist Episcopal Church.

“Those people couldn’t see the hatred in his heart any more than they could see the .45-caliber handgun and the eight magazines concealed around his waist,” Williams said.

Defense lawyer David Bruck conceded the defendant committed the slayings, but he asked jurors to look into his head and see what caused him to become so full of hatred, calling him a suicidal loner who never grasped the gravity of what he did. The defense put up no witnesses during the seven-day trial.