As for the first matter—namely, the follower separating from the imam—this is permissible whenever an excuse arises for the follower. Examples include the following:
If the imam prolongs the prayer beyond what is prescribed by the sunnah, the follower may separate from him. The evidence is the hadith of Muʿādh ibn Jabal: “When he led his people in prayer and made the recitation lengthy, one of them separated and prayed by himself” (1). When this reached the Prophet, peace and blessings be upon him, he did not condemn him.
Another example is when the imam performs the prayer so quickly that the follower is unable to attain the requisite composure. In that case, the follower must separate.
Another is when an excuse arises for the follower, such as being pressed by the need to urinate, being distracted by wind, vomiting, or the like. He may then separate because he is unable to keep up with the imam, provided that there is some benefit in separating—namely, that he can complete the prayer sooner than the imam without neglecting any obligatory act.
Another example, according to the stronger view, is when following the imam becomes legally impossible, such as when the follower’s prayer is shorter than the imam’s—for example, a man praying Maghrib behind someone praying ʿIshāʾ. The correct view is that this is permissible. When the imam rises for the fourth rakʿah, the follower separates and concludes the prayer with the salām. If he wishes, he may wait in the tashahhud until the imam catches up with him. As for the follower separating without an excuse, the correct view is that this invalidates the prayer, because the Prophet, peace and blessings be upon him, said: “The imam has only been appointed to be followed, so do not differ from him” (2).
As for the second matter—namely, that the second group, in the manner we have described, makes up what it missed of the prayer before the imam concludes with the salām—this has no parallel