Is the prayer of a mandatory worshipper valid behind one performing a voluntary prayer?
Chapter on Imamate and Congregational Prayer
Al-Mughni
Book of Prayer
Primary text
The prayer of a mandatory worshipper behind one performing a voluntary prayer is not valid, according to one narration attributed to Ahmad, and chosen by the majority of our companions, as well as the view of Al-Zuhri, Malik, and the People of Opinion (Ahl al-Ra'y). The evidence cited is the saying of the Prophet (peace be upon him): "The Imam is only appointed to be followed, so do not differ with him," which is agreed upon (Muttafaq 'alayh). Furthermore, the obligation of the follower is not fulfilled by the intention of the leader, similar to Friday prayer behind one performing the Dhuhr prayer.
Supporting text
It is permissible for the prayer to be valid. This view is narrated by Isma'il ibn Sa'id, and Abu Dawud narrated that Ahmad permitted a man who had prayed 'Asr, then forgot and led others in that same prayer, to continue when he remembered after one rak'ah. This is the view of 'Ata', Tawus, Abu Raja', Al-Awza'i, Al-Shafi'i, Sulayman ibn Harb, Abu Thawr, Ibn Al-Mundhir, and Abu Ishaq Al-Jawzajani, and it is considered the sounder opinion. The evidence is the narration of Jabir ibn 'Abdullah that Mu'adh used to pray with the Messenger of Allah (peace be upon him) and then return to lead his people in that same prayer (Muttafaq 'alayh). It is also narrated that the Prophet (peace be upon him) prayed two rak'ahs with one group of his companions during the fear prayer, then gave the salam, and then prayed two rak'ahs with another group, then gave the salam. The second group's prayer was considered voluntary, yet he led them while they were performing a required prayer. Another narration states that Abu Raja' led those who came to pray with him after he had already prayed, confirming the permissibility.