Abdur Rahman bin Abi Sa'id narrates from his father (may Allah be pleased with him): We were with the Messenger of Allah (peace and blessings be upon him) at the Trench (Khandaq). We were kept occupied from the prayers, so the Messenger of Allah (peace and blessings be upon him) ordered Bilal (may Allah be pleased with him) to call the iqamah for each prayer. This was before this verse was revealed: "And if you fear (the enemy), then (pray) on foot or riding." [Surah al-Baqarah: 239]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6005