Midrash for Sanhedrin 40:14
וכן בדוד הוא אומר (שמואל ב ז, א) ויהי כי ישב המלך דוד בביתו וה' הניח לו מסביב וכתיב (שמואל ב ז, ב) ויאמר המלך אל נתן הנביא ראה נא אנכי יושב בבית ארזים וגו'
said: This section<span class="x" onmousemove="('comment',' Ibid. XVII, 14. ');"><sup>19</sup></span> was spoken only in anticipation of their future murmurings,<span class="x" onmousemove="('comment',' It was not a command to appoint a king, but a prophecy that Israel would demand one; then, a king having been appointed, he would be subject to the laws stated in the section. ');"><sup>20</sup></span>
Sifrei Devarim
whence it was ruled: A king breaches (the fence of others) to make way for himself (to go to his vineyard or his field), and he may not be held back (from doing so). He may broaden roads for himself, and he is not held back from doing so. The path of the king has no limits. And all of the people take of the spoil and place it before him, and he takes the prime portion. (He chooses first and takes half of all the spoil.)
Ask RabbiBookmarkShareCopy