The answer is that the imam of the congregational mosque should be given precedence, because one of the conditions for leading the Friday prayer is that the imam be a settled resident, whereas the supreme imam is not a settled resident outside his own town. Some scholars, however, permitted this for two reasons:
First: there is no evidence that a person may not validly lead the Friday prayer unless he is a settled resident. (1)
Second: it may be said that the supreme imam is a settled resident throughout all the lands of his realm. This is why some scholars excused Uthman ibn Affan, may Allah be pleased with him, when he prayed the full prayer at Mina during the pilgrimage. (2) They said: Whatever is under the authority of the supreme imam, or caliph, is regarded as his own land; thus, wherever he goes, he is a settled resident. (3)
There is no doubt that this reasoning is defective—indeed, entirely unsound—for the Prophet, peace and blessings be upon him, possessed a firmer and more firmly established authority than anyone else. Yet whenever he travelled from Medina, he shortened the prayer. He also shortened the prayers during the Farewell Pilgrimage until he returned to Medina, and Uthman likewise shortened them at the beginning of his caliphate.
The view that the supreme imam cannot validly lead the Friday prayer outside his own town is weak, and its reasoning is defective. Rather, the correct view is that someone other than the supreme imam may also validly lead the Friday prayer outside his own town. Thus, if a scholar arrives in a town and its people say to him, “Lead us in prayer,” and he delivers the sermon and leads them in prayer, there is nothing wrong with that.
And [one who is] free, present, and resident, …
His statement: “And [one who is] free, present, and resident,” and so on.