An impassioned President Barack Obama led thousands of mourners in singing "Amazing Grace" on Friday at the funeral of a slain pastor in Charleston and urged Americans to eliminate symbols of oppression and racism, including the Confederate battle flag.

In a speech likely to be considered one of the most memorable of his presidency, Obama paid an emotional tribute to the nine people shot to death at the church and pleaded for Americans to use the tragedy as a way to bridge racial divides.

The shootings on June 17 sparked an intense dialogue over the legacy of slavery and its symbols after photos of the white man charged in the shooting showed him posing with the Confederate flag on a website that also displayed a racist manifesto.