صحیح ابن حبان
Ibn Hibban
كتاب الصلاة
Book of Prayer
باب شروط الصلاة - ذكر البيان بأن قوله صلى الله عليه وسلم وإلا فهي نافلة أراد به الصلاة الثانية لا الأولى
Chapter on Conditions of Prayer - Clarification that "otherwise it is voluntary" refers to the second prayer, not the first.
1 hadith
Hadith 1719
Sayyiduna Abu Dharr Ghifari (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) said to me: Perform the prayer at its (prescribed) time, then when you come to the people and they have already performed the prayer, you have protected your prayer, and if they have not yet performed the prayer, then perform the prayer with them, and it will be a voluntary (nafl) prayer for you.