Surah Al-Fil was revealed in the backdrop of the great historical event that occurred some time before the birth of the Holy Prophet ﷺ. This year is known in history as the Year of the Elephant (Aam-ul-Fil).
The Christian ruler of Yemen was Abraha Al-Ashram. He built a very large place of worship (church) in Sana'a so that the Arabs would come there for pilgrimage instead of the Kaaba, but the Arabs did not accept it. Abraha was very angry about this and decided to demolish the Kaaba.
Abraha set out towards Mecca with a very large army, which also included elephants. The Arabs had never seen elephants before, so this army was very frightening. When the army approached Mecca, the largest elephant (said to be named Mahmood) stopped moving towards the Kaaba, no matter how much it was beaten.
At that time, Allah Almighty manifested His power. He sent birds called Ababil, which came from the sky. They had small pebbles of baked clay in their claws and beaks, which would kill whoever they fell on. In this way, the entire army was destroyed, and Abraha himself was injured and returned, dying on the way.
This Surah was revealed to remind of this event and to show Allah's favor to the Quraish, so that they may know:
Allah Himself is the protector of the Kaaba
Allah can destroy powerful armies even with seemingly weak creatures
This event was a special sign of Allah near the advent of the Holy Prophet ﷺ
Summary of the occasion of revelation: Surah Al-Fil was revealed about the event of the destruction of Abraha's army with elephants, so that Allah's power, the protection of the Kaaba, and warning and advice for the Quraish would be clear.
Mufti Sadiq Amin Qasmi