Sanhedrin6: 1
נִגְמַר הַדִּין, מוֹצִיאִין אוֹתוֹ לְסָקְלוֹ. בֵּית הַסְּקִילָה הָיָה חוּץ לְבֵית דִּין, שֶׁנֶּאֱמַר: ,,הוֹצֵא אֶת הַמְקַלֵּל”. אֶחָד עוֹמֵד עַל פֶּתַח בֵּית דִּין וְהַסּוּדָרִין בְּיָדוֹ, וְאָדָם אֶחָד רוֹכֵב הַסּוּס רָחוֹק מִמֶּנּוּ, כְּדֵי שֶׁיְּהֵא רוֹאֵהוּ. אוֹמֵר אֶחָד ,,יֶשׁ לִי לְלַמֵּד עָלָיו זְכוּת”, הַלָּה מֵנִיף בַּסּוּדָרִין וְהַסּוּס רָץ וּמַעֲמִידוֹ. וַאֲפִלּוּ הוּא אוֹמֵר ,,יֶשׁ לִי לְלַמֵּד עַל עַצְמִי זְכוּת”, מַחֲזִירִין אוֹתוֹ, אֲפִלּוּ אַרְבָּעָה וַחֲמִשָּׁה פְעָמִים, וּבִלְבַד שֶׁיֵּשׁ מַמָּשׁ בִּדְבָרָיו. מָצְאוּ לוֹ זְכוּת, פְּטָרוּהוּ; וְאִם לָאו, יוֹצֵא לִסָּקֵל. וְכָרוֹז יוֹצֵא לְפָנָיו: אִישׁ פְּלוֹנִי בֶּן פְּלוֹנִי יוֹצֵא לִסָּקֵל עַל שֶׁעָבַר עֲבֵרָה פְלוֹנִית, וּפְלוֹנִי וּפְלוֹנִי עֵדָיו. כָּל מִי שֶׁיּוֹדֵעַ לוֹ זְכוּת יָבוֹא וִילַמֵּד עָלָיו.
Once the case has been decided, they take him out to stone him. The stoning place was outside the court [area], as it is stat-ed: Take out the blasphemer. One [man] stands at the courthouse door with flags in his hand, and [another] man sits astride a horse at a distance from him within his sight. [If] someone says, “I have grounds for his acquittal,” that one waves the flags and the horse runs and halts him. Even if he says, “I have grounds for my own acquittal,” they return him, even four or five times, as long as there is substance to his words. [If] they found an argument for his acquittal, they acquit him; if not, he goes out to be stoned. A proclamation goes out before him: So-and-so the son of so-and-so is going out to be stoned be-cause he transgressed such-and-such a prohibition, and so-and-so and so-and-so are his witnesses. Whoever knows any grounds for his acquittal should come forward and present them.
Sanhedrin6: 2
הָיָה רָחוֹק מִבֵּית הַסְּקִילָה כְּעֶשֶׂר אַמּוֹת, אוֹמְרִים לוֹ ,,הִתְוַדֵּה, שֶׁכֵּן דֶּרֶךְ הַמּוּמָתִין מִתְוַדִּין, שֶׁכָּל הַמִּתְוַדֶּה יֶשׁ לוֹ חֵלֶק לָעוֹלָם הַבָּא”. שֶׁכֵּן מָצִינוּ בְּעָכָן, שֶׁאָמַר לוֹ יְהוֹשֻׁעַ: ,,בְּנִי שִׂים נָא כָבוֹד לַה› אֱלֹהֵי יִשְׂרָאֵל וְתֶן־לוֹ תוֹדָה, וְגוֹ›. וַיַּעַן עָכָן אֶת־יְהוֹשֻׁעַ וַיֹּאמַר אָמְנָה אָנֹכִי חָטָאתִי . . . וְכָזֹאת, וגו›. וּמִנַּיִן שֶׁכִּפֶּר לוֹ וִדּוּיוֹ? שֶׁנֶּאֱמַר: ,,וַיֹּאמֶר יְהוֹשֻׁעַ מֶה עֲכַרְתָּנוּ יַעְכָּרְךָ ה› בַּיּוֹם הַזֶּה” — הַיּוֹם הַזֶּה אַתָּה עָכוּר, וְאִי אַתָּה עָכוּר לָעוֹלָם הַבָּא. וְאִם אֵינוֹ יוֹדֵעַ לְהִתְוַדּוֹת, אוֹמְרִים לוֹ ,,אֱמֹר: תְּהֵא מִיתָתִי כַּפָּרָה עַל כָּל עֲוֹנוֹתַי”. רַבִּי יְהוּדָה אוֹמֵר: אִם הָיָה יוֹדֵעַ שֶׁהוּא מְזֻמָּם, אוֹמֵר ,,תְּהֵא מִיתָתִי כַּפָּרָה עַל כָּל עֲוֹנוֹתַי חוּץ מֵעָוֹן זֶה”. אָמְרוּ לוֹ: אִם כֵּן, יְהוּ כָל אָדָם אוֹמְרִים כָּךְ כְּדֵי לְנַקּוֹת אֶת עַצְמָן.
[When] he was approximately ten cubits from the stoning place, they say to him, “Confess, as it is the practice of those who are executed to confess, because anyone who confesses has a share in the World to Come.” For so we find concerning Achan, that Joshua said to him: My son, please give honor to the God of Israel and render confession to him, etc. And Achan answered Joshua and said: I have sinned ... thus [have I done], etc. From where do we know that his confession brought him atonement? Because it says: And Joshua said, “Why have you troubled us? Hashem shall trouble you on this day” —- on this day you are troubled, but you will not be troubled in the World to Come. If he does not know how to confess, they said to him, “Say: Let my death by an atonement for all my sins.” R’ Yehudah says: If he knows that he is the victim of a plot, he should say, “Let my death be an atonement for all my sins except for this one.” They said to him: If so, everyone will say so in order to clear himself.