Mishnah/Seder Nezikin/Tractate Sanhedrin/Chapter 2
The High Priest can judge and be judged himself, can serve as a witness and others can witness against him, can perform Levirate nullification and others can perform Levirate nullification for his widow, and others can marry her through Levirate marriage, but he cannot marry another through Levirate marriage, because it is forbidden for him to marry a widow. (Someone close to him) dies, he cannot follow the coffin, except when they enter he is not there, and they are not there when he enters. He can go out to the opening [gates] of the city, such are the words of Rabbi Meir. Rabbi Yehuda says, he cannot leave from the Temple, as it is written (Leviticus 21:12) "And from the Temple, he cannot leave." When he comforts others, everyone passes by one after one, and an appointed person places himself between him and the people. When he is being comforted by others, everyone says to him, "we atone for him," and he says to them "you are blessed from heaven." And when he is fed in comfort, the whole nation sits on the ground and he sits on a bench.
The king cannot judge or be judged himself, cannot serve as a witness nor can others serve as a witness against him, cannot perform Levirate nullification, nor can others perform Levirate nullification for his widow. Rabbi Yehuda says, if he wants to perform Levirate nullification or marry through Levirate marriage, allow it. They [the sages] answered him: don't listen to him. And no one may marry his widow. Rabbi Yehuda says, a king may marry the widow of another king, like we find when David married the widow of Saul, as it is written (II Samuel 12:8), "and I give you the house of your master and the women of your master in your lap."
(Someone close to him) dies, he cannot go out from the opening of his palace. Rabbi Yehuda says, if he wants to go out following the coffin, he can go out, because David went out following the coffin of Abner, as it is written (II Samuel 3:31), "And King David went out after the coffin." They [the sages] answered: no, that was only a thing of compromise. And when he is fed in comfort, the whole nation sits on the ground, and he sits on an ottoman.
He [the King] can send people to a war of free choice according to the court of seventy one. He can break through to build a road, and there is no protest. The king's road has no measure. And everything that the nation plunders, they place in front of him, and he takes the first portion. "He cannot amass too many wives" (Deuteronomy 17:17), only 18. Rabbi Yehuda says, he can amass more, until they would turn his heart. Rabbi Shimon says, even if only one would turn his heart, he cannot marry her. If so, why does it say (ibid) "He cannot amass too many wives" - because of Abigail. "He cannot amass too many horses" (ibid, 17:16), only enough for his chariots. "And silver and gold, he cannot amass too much." (ibid, 17:17), only enough to pay his soldiers' wages. He must write a Torah scroll himself. (When) he goes to war, he takes it with him. (When) he enters, it's with him. (When) he sits for judgment, it's with him. (When) he reclines, it's opposite of him, as it is written (ibid 17:16), "and it will be with him, and he shall read in it all the days of his life."
No one may ride his horse, and no one may sit in his throne, and no one may use his scepter, and no one may look at him while his hair is is being cut or while he is nude or while he is in the bathhouse, as it is written (Deuteronomy 17:16), "set a king over yourself," whose awe is over you.