The Archbishop of Canterbury has apologised to the gay and lesbian community for the "hurt and pain" caused by the church.
The Most Rev Justin Welby said it was a "constant source of deep sadness" that people were persecuted because of their sexuality as he spoke after a meeting of Anglican leaders.
Mr Welby said facing protesters, particularly those from Africa, was a reminder of the "pain and suffering of many LGBTI people around the world".
"For me it's a constant source of deep sadness, the number of people who are persecuted for their sexuality," he said.
"I don't have the right to speak for everyone. I wanted to take this opportunity...to say how sorry I am for the hurt and pain, in the past and present, the church has caused."
Mr Welby spoke after church leaders agreed to sanction the American branch of the Anglican Communion over its views on marriage and homosexuality.
A meeting of Anglican primates in Canterbury reached an agreement on measures against the US Episcopal Church, which a statement said had made a "fundamental departure from the faith and teaching" by endorsing gay marriage.
The agreement upheld a "traditional doctrine" of marriage as being between a man and a woman.
The summit aimed to avert a permanent schism in the Anglican Communion amid division dating back to the liberal church's consecration of Canon Gene Robinson, who is gay, as bishop of New Hampshire in 2003.
The primates' statement said: "The traditional doctrine of the church in view of the teaching of scripture, upholds marriage as between a man and a woman in faithful, life-long union. The majority of those gathered reaffirm this teaching."