Some sahih sources of this hadith
The question is not that easy to answer.
There are a few similar narrations in both Sahih's
Meanings from linguistic perspective
In Arabic the noun:
refers to a referee, arbitrator, judge, it may also apply as a ruler and this is how it is translated in some of the translations of Sahih Muslim.
usually refers to a ruler, a leader and may also apply as referee, judge, arbitrator.
Ibn Hajar al-'Asqalani said commenting this hadith in the chapter "Sayings and teachings of the prophets()" in his Fath al-Bary -see here in Arabic-:
In the following I'll be translating from Arabic language, as these translations are of my own take them carefully.
( حكما ) أي حاكما ، والمعنى أنه ينزل حاكما بهذه الشريعة فإن هذه الشريعة باقية لا تنسخ ، بل يكون عيسى حاكما من حكام هذه الأمة .
(Hakam) means a ruler, and the meaning is that he descends as a ruler with this shari'a, for this shari'a will remain and will not be abrogated, rather 'Isa will be the ruler of the rulers of this nation.
وفي رواية الليث عن ابن شهاب عند مسلم " حكما مقسطا " وله من طريق ابن عيينة عن ابن شهاب " إماما مقسطا " والمقسط العادل بخلاف القاسط فهو الجائر .
And in the narration of Al-Layth on the authority of ibn Shihab in the book of Muslim, "a just judge," and it has a path via ibn 'Uyaynah on the authority of Ibn Shihab “a just imam. (leader)”
ولأحمد من وجه آخر عن أبي هريرة أقرئوه من رسول الله السلام وعند أحمد من حديث عائشة ويمكث عيسى في الأرض أربعين سنة وللطبراني من حديث عبد الله بن مغفل ينزل عيسى ابن مريم مصدقا بمحمد على ملته
And it was narrated by Ahmad from another route on the authority of Abu Huraira, who had read it (or been informed) (from others) from the Messenger of Allah, peace be upon him, and according to Ahmad from the hadith of 'Aisha, that 'Isa will remain on earth for forty years, and by al-Tabarani from the hadith of 'Abdullah bin Mughaffal, 'Isa son of Mary descends, confirming Muhammad on his religion (millah).
Imam an-Nawawi explained in his commentary on Sahih Muslim -see here-:
وقوله - صلى الله عليه وسلم - حكما أي ينزل حاكما بهذه الشريعة لا ينزل برسالة مستقلة وشريعة ناسخة بل هو حاكم من حكام هذه الأمة
And his saying - may Allah's prayers and blessings be upon him - (hakaman) as a ruler or arbitrator, means that he descends as a person ruling based on this shari'a. And does not come down with an independent message and an abrogating shari'a, rather he is a ruler from among the rulers of this nation (Ummah).
So 'Isa will be among the rulers of this Ummah and he will not come with a new shari'a, but rather confirm it and rule based on it.
More context and clarification of the leadership
Also note the Sahih hadith:
What will be your state when the son of Mary descends amongst you and there will be an Imam amongst you?
(See for example in Sahih al-Bukhari and in Sahih Muslim:1, 2 and 3 )
Which says 'Isa will appear at the time Muslims have an imam (leader) from among them (which is a reference to al-Mahdi). Which is also confirmed in:
I heard the Messenger of Allah (ﷺ) say: A section of my people will not cease fighting for the Truth and will prevail till the Day of Resurrection. He said: Jesus son of Mary would then descend and their (Muslims') commander would invite him to come and lead them in prayer, but he would say: No, some amongst you are commanders over some (amongst you). This is the honour from Allah for this Ummah.
For further information on al-Mahdi you may check: What is Sunni view regarding the savior of the world?
The following hadith which was compiled by al-Hakim and also by abu Dawod in his Sunan -it should at least be linked in the post above-:
The Prophet (ﷺ) said: The Mahdi will be of my stock, and will have a broad forehead a prominent nose. He will fill the earth will equity and justice as it was filled with oppression and tyranny, and he will rule for seven years.
Based on all the given information fatwa islamqa #170174 -available in Arabic only so far- summarizes:
- At the time 'Isa () descends al-Mahdi () is the imam of the Muslims. As 'Isa will pray behind him. The reign of al-Mahdi will last 7 years.
- Then 'Isa will follow as the leader of the Muslims and fight the Dajjaal.
Al-Mubarakpuri summarizes similarly in his commentary when introducing the first hadith chapter on al-Mahdi -see here in his Tuhfat al-Ahwadhi in Aarbic-:
اعلم أن المشهور بين الكافة من أهل الإسلام على ممر الأعصار أنه لا بد في آخر الزمان من ظهور رجل من أهل البيت يؤيد الدين ويظهر العدل ويتبعه المسلمون ويستولي على الممالك الإسلامية ويسمى بالمهدي
Know that it is well known among all the people of Islam through the ages, that at the end of time a man from the household of the Prophet must appear who will support the religion, show and reestablish justice. He will be followed by the Muslims, and will take over the Islamic kingdoms, and he will be called the Mahdi.
ويكون خروج الدجال وما بعده من أشراط الساعة الثابتة في الصحيح على أثره ،
The emergence of ad-Dajjaal (the Antichrist) and what comes after him are among the signs of the Hour that are confirmed in the Sahih will be on his trail.
وأن عيسى عليه السلام ينزل من بعده فيقتل الدجال أو ينزل من بعده فيساعده على قتله ويأتم بالمهدي في صلاته
And that 'Isa, peace be upon him, descends after him and kills the Dajjaal, or descends after him, and helps him to kill him and he will follow the Mahdi as the imam in his prayers.