King Solomon and the valley of ants

 

King Solomon and the "Valley of the Ants" and language of birds"(5 Verses)
Quran 27:16 - And Solomon inherited David. He said, "O people, we have been taught the language of birds,
and we have been given from all things. Indeed, this is evident bounty."
Quran 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."
Quran 27:19 - So [Solomon] smiled, amused at her speech, and said, "My Lord, enable me to be grateful for Your
favour which You have bestowed upon me and upon my parents and to do righteousness of which You approve.
And admit me by Your mercy into [the ranks of] Your righteous servants."
Quran 27:20 - And he took attendance of the birds and said, "Why do I not see the hoopoe - or is he among the absent?
Quran 27:22 - But the hoopoe stayed not long and said, "I have encompassed [in knowledge] that which you have not encompassed, and I have come to you from Sheba with certain news.

 

Aarne-Thompson-Uther (ATU) - Types of Folktales
ATU > 300-749: TALES OF MAGIC > 650-699: Supernatural Power or Knowledge > 670: The Language of Animals
Description: A man learns animal languages...
SOURCE: http://www.mftd.org/index.php?action=atu&src=atu&id=670

 

Legends of the Jews: Solomon's Carpet:
"On one occasion he strayed into the valley of the ants in the course of his wanderings. He heard
one ant order all the others to withdraw, to avoid being crushed by the armies of Solomon.
SOURCE: http://www.jewishencyclopedia.com/articles/13842-solomon#anchor14
SOURCE: http://www.jewishencyclopedia.com/articles/1570-ant-in-jewish-literature-the

 

The Jewish Encyclopedia includes a copy of Jellinek 150:22, which is about Solomon flying on a carpet.
The opening lines in this work and in the Quran – especially the ant's words – are almost identical, as can be seen:

 

Jellinek 150:22 - On another day while sailing over a valley where there were many swarms of Ants.
Solomon heard one ant say to the others, Enter your houses, otherwise Solomon's legions will destroy you.