Peter Tatchell has accused the Anglican church of accommodating homophobes in a way it would never do with racists or anti-Semites.

He was speaking an “in conversation” event with openly gay Bishop Gene Robinson at the Festival of Spirituality in Edinburgh yesterday.

The veteran campaigner compared the struggle over gays in the church to previous battles over evolution and votes for women and accused the Archbishop of Canterbury of double standards.

“Since becoming Archbishop of Canterbury, Rowan Williams has become a prisoner of the Lambeth Palace mafia,” said Mr Tatchell.

“They have jailed his heart and soul.

“He now puts preservation of the institution of the church before love of his fellow gay Christians and before the dignity of lesbian and gay people. Church unity is more important to him than gay equality.”

Dr Williams was accused of “readily meeting anti-gay Bishops” and colluding with “the persecutors of gay people, like Archbishops Akinola and Orombi.”

Archbishop Peter Akinola of Nigeria has backed legislation to outlaw gay churches, gay organisations, gay HIV prevention programmes and gay human rights advocacy, said Mr Tatchell.

Henry Orombi, the Archbishop of Uganda, excommunicated heterosexual bishop, Christopher Senyonjo, after he spoke out against the persecution of lesbian and gay Ugandans,” he added.

Correspondence from 2000 and 2001 between Dr Williams, then Archbishop of Wales, and an evangelical parishoner, shows his theological support for gay relationships.

“I concluded that an active sexual relationship between two people of the same sex might therefore reflect the love of God in a way comparable to marriage, if and only if it had about it the same character of absolute covenanted faithfulness,” read one letter, quoted in The Times.

At the conclusion of the Lambeth Conference last weekend Dr Williams said the “pieces are on the board” for a settlement.

The conference, held once every ten years, is a meeting of the leaders of the Church from around the world.

This year more than 200 bishops boycotted the event.

He also called on American churches not to elect any more gay bishops.

In a sermon on the final day of the Lambeth Conference in Canterbury, Dr Williams said:

“In these days together we have not overcome our problems or reinvented our structures: that will still take time.”

But despite there still being “many questions” on the issue, a Covenant to bind the Communion together is needed, he said: “We may not have put an end to all our problems – but the pieces are on the board.”

The Covenant could mean churches with new gay bishops could be expelled from the Anglican Communion.