Surah An-Naml 27:18
حَتَّىٰٓ إِذَآ أَتَوْا۟ عَلَىٰ وَادِ ٱلنَّمْلِ قَالَتْ نَمْلَةٌ يَـٰٓأَيُّهَا ٱلنَّمْلُ ٱدْخُلُوا۟ مَسَـٰكِنَكُمْ لَا يَحْطِمَنَّكُمْ سُلَيْمَـٰنُ وَجُنُودُهُۥ وَهُمْ لَا يَشْعُرُونَ
Until, when they came upon the valley of the ants, an ant said, "O ants, enter your dwellings that you not be crushed by Solomon and his soldiers while they perceive not."
Translation: Saheeh International
Tafsir
When they came to the Valley of the Ants — which is located either in Tā’if or in Syria and whose ants are either small or large — an ant the queen ant who had seen Solomon’s hosts said ‘O ants enter your dwellings lest Solomon and his hosts crush you while they are unaware!’ — the ants are likened to rational beings …
Excerpt from Tafsir al-Jalalayn, commentary on 27:18, via Quran.com. The reader has the full commentary and 9 more tafsirs.