Abdullah bin Umar reported,

On the day the Messenger of Allah ﷺ returned from the Battle of the Confederates, he announced to us that no one should pray the afternoon prayer except at Banu Qurayza. Some people feared that the prayer time would expire, so they prayed before reaching Banu Qurayza. Others said, "We will not pray except where the Messenger of Allah ﷺ commanded us, even if the time expires." He did not rebuke either group.

Muslim 4602

Sahih

و حدثني عبد الله بن محمد بن أسماء الضبعي حدثنا جويرية بن أسماء عن نافع

عن عبد الله قال

نادى فينا رسول الله ﷺ يوم انصرف عن الأحزاب أن لا يصلين أحد الظهر إلا في بني قريظة فتخوف ناس فوت الوقت فصلوا دون بني قريظة وقال آخرون لا نصلي إلا حيث أمرنا رسول الله ﷺ وإن فاتنا الوقت قال فما عنف واحدا من الفريقين

مسلم 4602صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Jihad and expeditions
Chapter
One who is bound by a matter and then another matter is added to it
Numbering
Darussalam 4602
Muslim 4602