Dylann Roof, who shot dead nine black churchgoers who had invited him in to worship with them, has been sentenced to death in South Carolina.
The 22-year-old becomes the first person in the US to be given the federal death penalty for hate crimes.
Roof picked out Charleston's Emanuel AME Church, the South's oldest black church, to target his victims on 17 June 2015.
It is understood they smiled as they welcomed him in to spend time with them studying the Bible.
About 45 minutes into the study session, as the group closed their eyes to pray, he began firing the Glock .45 he had been carrying.
Some of his victims were shot again, as he stood over them, after they had fallen to floor. Only three out of the 12 in the church at the time survived.
Seventy-five bullets were fired at the victims, who were aged between 26 and 87.
In December, he was found guilty of 33 charges including federal hate crimes resulting in the deaths of the nine parishioners, firearms violations and obstruction of the practice of religion.
Hours before the sentencing, Roof was given the chance to plead for his life in front of jurors - but told them: "I still feel like I had to do it."
Only one of the 12 jurors had to disagree that he should die for him to spend the rest of his days behind bars.
The jury made its decision in less than three hours.
The brother of victim Cynthia Hurd gave a press conference afterwards. Melvin Graham said: "It's a hard thing to know that someone is going to lose their life, but when you look at the totality of what happened, it's hard to say that this person deserves to live when the nine others don't.
"How do you justify saving one life when he took nine - he just took them away from us."
Roof, who defended himself in the sentencing, never explained his actions to jurors, saying only that "anyone who hates anything in their mind has a good reason for it".
Last week, he told the jury that he was not mentally ill, and he did not call any witnesses or present any evidence in his defence.
In his FBI confession, he said that he hoped the massacre would bring back segregation or start a race war.
Despite Roof's apparent aims, the murders had the opposite effect, with South Carolina removing the Confederate flag from its Statehouse for the first time in more than 50 years and other states following suit, taking down Confederate banners and monuments.
Roof had posed with the flag in photos.
His lawyers, who had objected to his self-representation, said in a statement: "Today's sentencing decision means that this case will not be over for a very long time.
"We are sorry that, despite our best efforts, the legal proceedings have shed so little light on the reasons for this tragedy."
CBS's Roxana Saberi said the families of those who had died were divided about whether he should have been given the death penalty.
But the jurors were told to take into consideration that Roof had not shown any remorse.