The correct view is that he should conclude the prayer with the imam. When these two views are added to the author’s view, there are three opinions:
First: Repeating Maghrib is not recommended.
Second: It is recommended, but he should add a rak‘ah to make it even-numbered.
Third: It is recommended, but he should not add a rak‘ah; and this is the correct view.
If someone were to ask: Is it recommended for a person deliberately to go to a mosque in order to repeat the prayer? That is, if he prayed with an early congregation while knowing that there will be a later congregation, should he go to another mosque to repeat it?
The answer is: It is not recommended, because this was not the practice of the righteous early generations. Had this been among the acts of goodness, the Companions would have been the first of people to do it. However, if there is a reason requiring you to go to the mosque, then, when the prayer is commenced, pray with them, for it is a voluntary prayer.
From this legal ruling we also learn that the Sacred Law takes into consideration people’s harmony, unity, and avoidance of division. He was only instructed to repeat the prayer so that he may be with the Muslims and not remain alone, saying, “I have already prayed.” We say: Pray with the Muslims, for this is better, so that the outward appearance of the Muslim community may be one, free of disagreement.
From this we conclude that what some people do in the Ramadan night prayer—when they have prayed ten rak‘ahs behind an imam who prays twenty, they sit down and leave the imam, then rise to pray witr with him once he begins it—is contrary to what the sunnah indicates and to the practice of the righteous early generations in striving to follow the imam in his juristic judgments.