I said to Umar bin Khattab, "Allah says, 'There is no blame upon you if you shorten the prayer, should you fear that those who disbelieve may attack you' [Nisa 4:101], yet the people are now safe."Umar replied, "I wondered at the same thing you are wondering about, so I asked the Messenger of Allah ﷺ about it."He said, "It is a charity that Allah has bestowed upon you, so accept His charity."
قلت لعمر بن الخطاب: {فليس عليكم جناح أن تقصروا من الصلوة إن خفتم أن يفتنكم الذين كفروا} فقد أمن الناس. فقال: عجبت مما عجبت منه. فسألت رسول الله ﷺ عن ذلك. فقال: صدقة تصدق الله بها عليكم فاقبلوا صدقته.
Muslim reported it in "Prayer of the Traveler" (686), through various routes from Abdullah bin Idris, from Ibn Jurayj, from Ibn Abu Ammar, from Abdullah bin Babayh, from Yaala bin Umaya, and he related it.