What is the ruling regarding the intention (Niyyah) required for the validity of congregational prayer (Jama'ah) between the Imam and the follower?

Chapter on Imamate and Congregational Prayer

Al-Mughni

Book of Prayer

Book 3 · Issue 3 · Bab 10

Open in Qurani

Primary text

For the congregational prayer to be valid, the Imam must intend to be the Imam, and the follower (Ma'mum) must intend to be the follower, both while performing their respective states in the prayer. If two men pray, and each intends to be the Imam of the other, or the follower of the other, their prayers are invalid. This invalidity stems from imitating someone who is not acting as an Imam in the first scenario, or leading someone who has not intended to follow in the second scenario. If a man sees two people praying and intends to follow the one who is already following another (the Ma'mum), his prayer is invalid because he follows someone who has not intended to be an Imam.

Supporting text

If a person intends to follow one of two men praying without specifying which one, the prayer is invalid because specification of the Imam is a condition. If one intends to follow both men simultaneously, the prayer is invalid because one cannot follow someone who is not acting as an Imam (by following another), and because following more than one person is prohibited. Similarly, intending to follow two Imams is impermissible because it is impossible to follow both simultaneously.