In reply to Tim Chappell:
"“But the church seeks with mercy to turn back those who go astray, and condemns them not immediately but only after a first or second warning. If, however, a heretic remains stubborn, the church, despairing of his conversion, takes care of the salvation of others, separates the heretic from the church with a sentence of excommunication and delivers him to the secular courts to be removed from the world by death.”"
T. Aquinas, Summa Theologica
probably following on from
Deuteronomy 17:2-5 King James Version (KJV)
2 If there be found among you, within any of thy gates which the Lord thy God giveth thee, man or woman, that hath wrought wickedness in the sight of the Lord thy God, in transgressing his covenant,
3 And hath gone and served other gods, and worshipped them, either the sun, or moon, or any of the host of heaven, which I have not commanded;
4 And it be told thee, and thou hast heard of it, and enquired diligently, and, behold, it be true, and the thing certain, that such abomination is wrought in Israel:
5 Then shalt thou bring forth that man or that woman, which have committed that wicked thing, unto thy gates, even that man or that woman, and shalt stone them with stones, till they die.