The Archbishop of Canterbury has told of his sorrow and shame at the Church of England's history of racism, as a vote was taken to apologise for its decades-long failures towards black and minority ethnic people since the arrival of the Windrush generation in the UK.

The Most Reverend Justin Welby said the church remains "deeply institutionally racist", in a speech made as the General Synod unanimously backed a motion to "lament" and apologise for both conscious and unconscious racism.

Introducing the motion, Synod member Reverend Andrew Moughtin-Mumby, from Southwark Diocese, spoke of the "horrible, humiliating racism" experienced by the family of one of his parishioners who were turned away from a south London church because they were black.

Rev Moughtin-Mumby said Doreen Browne's family had been barred from St Peter's Church in Walworth in 1961 "due to the plain fact of the colour of their black skin".

"They eventually found a home in a nearby parish church - but we know that many cradle Anglicans from the Caribbean did not, and simply left the Church of England: that is a scandal of our own," he said.

"Doreen's family suffered a horrible, humiliating racism which still affects Doreen's relationship with the Church even today."

Mr Welby, in off-the-cuff remarks given after he said he felt the need to "ditch" his prepared speech following Rev Moughtin-Mumby's words, told the Synod he was "almost beyond words".

He said: "Personally, I am sorry and ashamed. I'm ashamed of our history and I'm ashamed of our failure."

He added: "There is no doubt when we look at our own Church that we are still deeply institutionally racist. Let's just be clear about that. I said it to the College of Bishops a couple of years ago and it's true."

He said the "hostile environment" must be transformed into a "hospitable, welcoming one", and urged "radical and decisive" progress on the issue in order to put an end to institutional racism.

He said: "Unless we are radical and decisive in this area in the future, we will still be having this conversation in 20 years' time and still doing injustice - the few of us that remain, deservedly."

Looking to how to address the issue in the future, Mr Welby said "basic rules" were needed going forward, including having ethnic minorities or other discriminated-against minorities represented on appointment panels within the church.

"It doesn't work when long lists are simply one colour," he said. "It does not work."

As part of Tuesday's motion, the Synod voted to request research on the impact of such racism in terms of members lost and church closures through the years, as well as appointing an independent person to assess the current situation on race and ethnicity in the church.