the author of «eqdud-durar» narrates (in the first chapter) from the book 'manaqib-ul-Mahdi' of hafez abu na'eem esfahani who narrates from abu saeed khudri who narrates from the holy prophet (s.a.w.a.) as such:-
'from us is the one behind whom shall pray isa.'(68)
traditions in this regard are many and what we have narrated about his imamate, distinction and leadership are adequate.
ganji in his book 'bayan', after mentioning traditions on 'salat' (prayers) says: if someone says: the authenticity of this tradition that isa (a.s.) shall stand for prayers behind Mahdi (a.s.) and will fight along with him and the fact that isa (a.s.) shall kill dajjal in the presence of Mahdi and Mahdi (a.s.) will be having precedence over isa at the time of prayers are all well-known. similarly, his position is more than isa at the time of 'jihad' (the holy war).
as far as the authenticity of these traditions are concerned they are resolute before the ahl-e-sunnah and shi'ites too have narrated them in a similar manner.
therefore, all the muslims, whether shias or sunnis are unanimous and united over the evidence of Mahdi's existence which means that except for the sayings of shias and sunnis, the sayings of other sects is immaterial. in spite of such consensus on this matter and its authenticity we ask: amongst the two (i.e.
Mahdi and isa) who is having precedence over the other in prayers and battle?!
we reply: Mahdi and isa are both leaders, one is the prophet and the other is the imam; although in a congregation the one who is the imam shall be the leader over the other who is the prophet. besides, none of the two fear from reproach (of others) seeking the path of Allah and both are immaculate from all types of sins such as deceit, showing off (the good deeds) and hypocrisy. moreover, none of the two will invite the others towards an act which is outside the decree of 'shariat' (religious bindings) and against the wish of Allah and his prophet.
when such is the affair, then 'imam' (who is Mahdi) is superior to 'mamoom' (who is isa) because, muhammad's shariat has commanded as such. the proof of this is what the holy prophet (s.a.w.a.) has said:
the one whose recitation of quran is better (than others) shall lead the people. if it is equal amongst all, then the most wise shall lead and if still they are equal, the most learned shall lead. if yet they are equal, the one who has taken precedence over the others in 'hijrat' (migration) shall lead and if again they remain the same, the one with a handsome face shall lead. thus if Mahdi realizes that isa is superior to him, it is not permissable for imam to take precedence over isa in the 'shariat' since Allah has kept imam pure and clean from every abominable act. similarly if isa realizes that Mahdi is superior to him, it is not permissible for him to allow Mahdi to follow him because, Allah has protected him from pretention, hypocrisy and showing-off. rather, when once imam becomes sure that he is more learned than isa it is permissible for him to take precedence over isa. similarly when isa becomes certain that Mahdi is more learned than him he will allow hazrat to take precedence and he himself will on the other hand, follow him. this was regarding superiority in prayers.