The Rambam · Sefer Shoftim
הלכות עדות א׳Testimony 1
Chapter 1 of 22 in Testimony — 6 halachot
Halacha 1א׳
הָעֵד מְצֻוֶּה לְהָעִיד בְּבֵית דִּין בְּכָל עֵדוּת שֶׁיּוֹדֵעַ. בֵּין בְּעֵדוּת שֶׁיְּחַיֵּב בָּהּ אֶת חֲבֵרוֹ בֵּין בְּעֵדוּת שֶׁיְּזַכֵּהוּ בּוֹ. וְהוּא שֶׁיִּתְבָּעֶנּוּ לְהָעִיד בְּדִינֵי מָמוֹנוֹת שֶׁנֶּאֱמַר (ויקרא ה א) "וְהוּא עֵד אוֹ רָאָה אוֹ יָדָע אִם לוֹא יַגִּיד וְנָשָׂא עֲוֹנוֹ":
The witness is commanded to testify in religious court giving all testimony which he knows, whether his testimony will cost his friend or benefit him. This is when he [the witness] is selected to testify in a monetary case, as it is said (Leviticus 5:1) "If he is a witness or saw or knew, if he does not tell, he shall bear his sin."
Halacha 2ב׳
הָיָה הָעֵד חָכָם גָּדוֹל וְהָיָה בְּבֵית דִּין פָּחוּת מִמֶּנּוּ בְּחָכְמָה. הוֹאִיל וְאֵין כְּבוֹדוֹ שֶׁיֵּלֵךְ לִפְנֵיהֶם עֲשֵׂה שֶׁל כְּבוֹד תּוֹרָה עָדִיף וְיֵשׁ לוֹ לְהִמָּנַע. בַּמֶּה דְּבָרִים אֲמוּרִים בְּעֵדוּת מָמוֹן. אֲבָל בְּעֵדוּת שֶׁמַּפְרִישׁ בָּהּ מִן הָאִסּוּר וְכֵן בְּעֵדוּת נְפָשׁוֹת אוֹ מַכּוֹת הוֹלֵךְ וּמֵעִיד שֶׁנֶּאֱמַר (גמרא ברכות יט ב) "אֵין חָכְמָה וְאֵין תְּבוּנָה לְנֶגֶד ה'". כָּל מָקוֹם שֶׁיֵּשׁ חִלּוּל הַשֵּׁם אֵין חוֹלְקִין כָּבוֹד לָרַב:
If the witness is a great sage and he is in a religious court which is his inferior in wisdom, because it is inconsistent with his honor [to appear before the court], the positive commandment of respect for the Torah takes precedence, and he may refrain from going. When are these matters said? For testimony about monetary issues. However, for testimony which prevents forbidden actions, and for testimony about capital matters or matters which could incur the punishment of lashes, he must go and testify, as it says (Berachot 19b), "There is neither wisdom nor understanding against the Lord."
Halacha 3ג׳
כֹּהֵן גָּדוֹל אֵינוֹ חַיָּב לְהָעִיד אֶלָּא עֵדוּת שֶׁהִיא לְמֶלֶךְ יִשְׂרָאֵל בִּלְבַד. הוֹלֵךְ לְבֵית דִּין הַגָּדוֹל וּמֵעִיד בָּהּ. אֲבָל בִּשְׁאָר הָעֵדֻיּוֹת פָּטוּר:
A high priest is never obligated to testify, except where the testimony concerns a King of Israel. [Then,] he goes to the great religious court and testifies. However, he is exempt from providing other testimony.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0