Image copyright Reuters Image caption Roof said he wanted to start a race war

A white supremacist has been convicted of killing nine black worshippers in a church in South Carolina in a racially motivated attack.

It took the 12 jurors just over two hours to convict 22-year-old Dylann Roof on all 33 counts he faced, including federal hate crimes.

He will find out next month if he will receive the death penalty.

The attack in 2015 during Bible study at the Emanuel African Methodist Episcopal Church shocked the nation.

It also reignited a debate about race relations and the flying of the Confederate flag.

Roof told police he wanted to start a race war and he was photographed holding the Civil War battle flag, which to many is a symbol of hate.

The tragedy led to the flag being removed from the South Carolina statehouse, where it had flown for 50 years.

At a memorial service for the victims at the church in Charleston, President Barack Obama sang Amazing Grace and gave one of his most significant speeches on race.

Media playback is unsupported on your device Media caption Barack Obama leads the congregation in singing the hymn Amazing Grace

In a videotaped FBI confession, Roof was seen laughing and making sweeping gun motions as he described the attack.

He told investigators he wanted the world to know he hated black people and thought they were criminals.

Roof said he carried out the massacre after studying "black on white crime" online, and chose a church because his victims would be unlikely to threaten him.

Media playback is unsupported on your device Media caption US church gunman: 'I did it'

Defence lawyer David Bruck conceded Roof committed the murders but said he was a suicidal loner who did not realise the full extent of what he had done.

As the verdict was read out, and all 33 counts were followed by "guilty", he stared ahead.

Relatives of victims held hands and squeezed each other, while one woman nodded her head in affirmation as the clerk said "guilty" for each count.

As well as the hate crimes, jurors also found him guilty of obstructing the exercise of religion for those he shot.

Image copyright Reuters Image caption The church was targeted because of its mainly African American congregation

After the verdict, survivor Felicia Sanders said Roof was a coward because he refused to look at her as she gave evidence.

She said she would remember her murdered friends in a special way.

"I wear a smile, because if you look at the pictures of all nine, they're smiling," she said.

In a statement by the Southern Poverty Law Center, which monitors hate crimes, Roof was described as "the modern face of domestic terrorism".

Moments after the verdict, South Carolina Governor Nikki Haley released a statement saying she hopes the families of the nine victims, and the survivors, can find some peace.

She pushed to remove the Confederate flag from the grounds of the statehouse, after the picture emerged of Roof embracing the flag.

More on the shootings

Image caption The victims, clockwise from top left: Rev Clementa Pinckney, Susie Jackson, Rev Sharonda Singleton, Tywanza Sanders, Rev Daniel Simmons, Depayne Middleton-Doctor

The month that changed America?

The victims of Charleston shooting

Why a simple flag is so potent in the US