Al-Ghazali on Ants and Cooperation

So look to the ants and how God has inspired them to the action of gathering together for the gathering of their sustenance, and their cooperation regarding that task, and their preparation for the time of their inability to depart [from their home], and their regulation on account of heat and cold. They are inspired regarding the matter of inconstancy of conditions to determination towards outcomes which are not immediately known, so that you can see in that matter that when one of them is incapable of bearing what he bears, or is struggling with it, he is aided by another ant. So the cooperative activity of transporting [among the ants] is like the humans cooperating in labor that cannot be completed save through cooperation.

Then, they are inspired to delve houses into the earth, beginning in that by expelling the dirt, and setting out for grains in which is their sustenance, and dividing them up lest they sprout in the moistness of the earth- and none other created this aspect in their nature save the Merciful, the Compassionate. Then, if moisture encounters the grain, they take them out and spread them out until they dry. They only build houses in elevated locations of the earth, places that are dry, without streams that could flood the houses.

Abū Ḥāmed Muḥammad ibn Muḥammad Ghazālī (1058-1111), The Wisdom in God’s Creation

See also: On the Spider, On the Human Eye

On the Spider

Look at the spider and what God created in it in wisdom! Verily, God created in her body moisture (ratūbah) from which she weaves a house to dwell in, and a net for her hunting- it is crafted out of her body, and God made her nourishment through her sustenance (aqwātihā), directing [her sustenance] towards the capacity of her body, and to the forming of this previously mentioned moisture. She always sets it up like a net, with her house in the corner of the net. And the capacity of her house is such that she hides herself, and the net, by means of fine threads, intwines the legs of flies and mosquitoes and similar creatures. When she senses that one of those sorts of creatures has fallen in her net, she hurries out to it, lays hold of it, and returns to her house. She is sustained by what she derives from the moisture of these animals, and she is satisfied at that time, hobbling [her prey] and leaving it until the next time of her need.

And look at the means for obtaining her sustenance that God created in her, so that she attains in that what humans attain through discursive thought and artifice. And all that is for her well-being and the reception of her food, and ‘Know that God- He is the Director of this.’

Abū Ḥāmed Muḥammad ibn Muḥammad Ghazālī (1058-1111), The Wisdom in God’s Creation, 91.