Following a lengthy discussion of rabbinic enactments made mipnei tikkun ha-olam – to encourage the proper workings of society – our Mishna introduces a new set of similar enactments that were instituted to establish certain norms of behavior mipnei darkhei shalom – in order to keep the peace. One example is the rule that a kohen will always be called to the Torah first, a levite second, and only afterwards will others be called. Several amora’im are quoted by the Gemara as noting that there are pesukim in the Torah that serve as sources for this rule. This leads Abaye to question why the Mishna refers to this rule as darkhei shalom when, in fact, it is a biblical law. Abaye rejects the possibility that the Mishna is simply referring to a biblical law as darkhei shalom, since all of the laws of the Torah are based on concepts of shalom (see Mishlei 3:17). Instead he posits that while the Torah suggests that the kohen should be honored and given priority, the Mishna is teaching us that a kohen must go first, and that even if he wants to allow someone else to take his place, he cannot, since this will ultimately lead to strife.
From the conclusion of our Gemara it seems clear that the rule giving precedence to kohanim has its basis in biblical law. From the Talmud Yerushalmi it appears that there is a disagreement between the sages as to whether this law is truly biblical (based on the quoted sources) or if it is only mipnei darkhei shalom.
Although the tradition in all communities is to accept Abaye’s position and to call a kohen up to the Torah first under all circumstances, according to the Rambam the ideal would be for a Torah scholar to be called to the Torah first. He suggests that our Gemara is only discussing cases in which there is no Torah scholar in the room or the kohen himself is a Torah scholar, but that the honor due to the Torah requires that we prefer a scholar over a kohen. The Rambam’s position notwithstanding, general practice is to always call up a kohen first.