TT #257 · Parashas Shoftim · Sixth Aliyah · Passuk 19:19
Then you shall do to him as he had plotted to do to his brother, and you shall purge the evil from your midst.
Torah Temimah points to Makkot 2a–5b.
TT lemma: וַעֲשִׂיתֶם לוֹ כַּאֲשֶׁר זָמַם.
English: ‘You shall do to him as he had plotted to do to his brother’ – and not as he actually did.
Derash on the measure-for-measure principle (Bavli) — the key word is ‘zamam’ (plotted), not ‘asah’ (did).
The conspiring witnesses receive the penalty they plotted to inflict, provided the plot was not yet carried out; once the verdict has been executed the rule changes.