, he should offer that prayer with them, whether or not he has a missed prayer to make up, as the Prophet (may Allah bless him and grant him peace) instructed when addressing two men who had not prayed with the people. He said:
“Why did you two not pray? Are you not Muslims?”
They replied, “O Messenger of Allah, we prayed at our lodgings.”
He said, “If you pray at your lodgings and then come to a mosque where a congregation is praying, pray with them, for it will count as a voluntary prayer for you.”
Anyone who has a missed prayer to make up must do so immediately, whether he missed it deliberately or through forgetfulness, according to the majority of scholars, including Mālik, Ahmad, Abū Hanīfah and others. Likewise, the stronger view in the Shāfiʿī school is that a prayer missed deliberately must be made up immediately. When he prays with the congregation, he should intend the second prayer as a repetition of the first. According to the correct view, the first counts as the obligatory prayer and the second as voluntary, as indicated by this hadith and others.
It has also been said that whichever of the two prayers is more complete counts as the obligatory prayer; and it has been said that this is left to Allah Most High. And Allah knows best.
He—may Allah have mercy on him—was asked:
About the hadith of Yazīd ibn al-Aswad, who said:
“I attended the pilgrimage of the Messenger of Allah (may Allah bless him and grant him peace) and prayed the dawn prayer with him in the Mosque of al-Khayf. When he had finished the prayer and turned around, he noticed two men at the back of the gathering who had not prayed. He said: