A US judge has claimed that the family of the man charged with shooting nine black churchgoers last week are also “victims” – as it emerged he had previously received a public reprimand over the use of racist language in court.

The suspected shooter, 21-year-old Dylann Roof, appeared in Charleston County Magistrate James Gosnell Jr.’s court yesterday and was charged with nine counts of murder.

Roof is accused of killing nine members of the historically black South Carolina church’s congregation on Wednesday night. The case has sparked intentional interest and thrown a light – yet again – on America’s complex racial tensions.

Judge Gosnell told the court yesterday: “We have victims - nine of them. But we also have victims on the other side. There are victims on this young man's side of the family.”

His comments follow his 2003 remarks, when he was reprimanded for using the word “n*****” in court.

"There are four kinds of people in this world -- black people, white people, red necks, and n*****s,” Gosnell said at the time.

The comments led to a disciplinary hearing in which Judge Gosnell claimed that he had known the defendant’s family history and made the remark – which he claimed he first heard from an African American sheriff’s deputy – in order to “encourage” the defendant to “recognise and change the path he had chosen in life.”

In the same 2005 hearing, another ethical complaint over the judge’s conduct was raised.

It emerged that also in 2003, Judge Gosnell had driven to a local jail to arrange a bond and prevent fellow judge Joseph Mendelsohn from spending a night in prison after he was arrested for driving under the influence.

In pictures: Charleston vigil Show all 6 1 /6 In pictures: Charleston vigil In pictures: Charleston vigil Charleston vigil Sunlight shines through a window and onto some of the thousands of people gathered for a city-sponsored prayer vigil for the nine victims of the Emanuel AME Church shooting GETTY In pictures: Charleston vigil Charleston vigil People attend a vigil at TD Arena for victims of the Charleston church shooting GETTY In pictures: Charleston vigil Charleston vigil A view of Emanuel AME Church in Charleston, South Carolina GETTY In pictures: Charleston vigil Charleston vigil People attend a prayer vigil at the TD Aren GETTY In pictures: Charleston vigil Charleston vigil Family members of the nine victims of the Emanuel AME Church shooting sit on the first five rows during a prayer vigil at the College of Charleston TD Arena GETTY In pictures: Charleston vigil Charleston vigil NBA Houston Rockets center Dwight Howard (C) joins thousands of people for a prayer vigil for the nine victims GETTY

According to the hearing, Judge Gosnell told officials to “make it appear that Judge (Joseph) Mendelsohn's bond was set at 8.00am," despite him leaving the jail at 2.30am.

These arrangements have been banned by the state Supreme Court, CNN noted, unless a judge sets bail for everyone in the jail – which Judgeg Gosnell did not.