The US Department of Justice will pursue the death penalty against 22-year-old white supremacist Dylann Roof, who faces trial for a deadly shooting in a South Carolina African-American church that killed eight black parishioners and their pastor.

"Following the department's rigorous review process to thoroughly consider all relevant factual and legal issues, I have determined that the Justice Department will seek the death penalty," Attorney General Loretta Lynch said in a statement. "The nature of the alleged crime and the resulting harm compelled this decision."

Roof's "lack of remorse," his "animosity towards African Americans" that played a role in the murders and his intent to "magnify the societal impact" of the rampage all led to the decision, according to a court document filed in the federal case against Roof.

In addition, three of the victims were between the ages of 70 and 87. Under federal law elderly or young victims can be aggravating circumstance bolstering a call for the death penalty.

Roof sat quietly in a bible study group in the Emanuel African Methodist Episcopal Church in June 2015 before he opened fire, targeting church members because they were black, prosecutors charge.

He hesitated at first because "everyone was so nice," he would later say, but then he announced he was there to "shoot black people," said investigators. Nine lay dead at the end of the attack, including popular church pastor and South Carolina State Senator, Clementa Pinckney.

Witnesses said Roof left three people alive so they could "tell what happened." He reportedly added: "I have to do it. You rape our women and you're taking over our country, and you have to go."

According to officials, Roof admitted to the crimes when he was caught by police a day later and claimed he had hoped the shootings would ignite a "race war." He had selfies on his website posing with the Confederate flag and the banner of apartheid South Africa, and posted a "manifesto" declaring his violent mission.

charleston shooting
Police lead suspected shooter Dylann Roof, 21, into the courthouse in Shelby, North Carolina Jason Miczek/reuters

His photo launched a debate about the Confederate flag, and the banner was ejected from a number of public areas in the South in the wake of the shootings. Roof was charged with 33 federal offences, including hate crimes, obstruction of religion and illegal firearms counts.

He has been charged with nine counts of murder and three counts of attempted murder by the state. Previously, Charleston County Solicitor, Scarlett Wilson, has already said that she will also seek the death penalty in South Carolina's case, which is scheduled to go to trial at the start of 2017.

Only three federal inmates have been executed since the federal death penalty was reinstated in 1988, following a 16-year moratorium.

There are close to 60 federal inmates currently on death row. Boston Marathon bomber Dzhokhar Tsarnaev is one of the most recent people to be handed the death penalty after he was sentenced by a federal judge in May 2015.