Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:41:11

Then He directed Himself to the heaven while it was smoke and said to it and to the earth, "Come ˹into being˺, willingly or by compulsion." They said, "We have come willingly."  

Then He turned to the heaven when it was smoke, ˹consisting of˺ rising vapours, and He said to it and to the earth, “Come both of you, to what I desire from you, willingly, or unwillingly!” (taw‘an aw karhan, their ˹syntactical˺ locus is that of a circumstantial qualifier, in other words, ‘˹Come˺ being obedient or coerced’). They said, “We come, together with all those inhabiting us, willingly!” (tā’i‘īna mainly indicates masculine rational beings; it may also be that they are referred to in this way because they are being addressed thus).
القرآن:٤١:١١

ثُمَّ اسْتَوَىٰ إِلَى السَّمَاءِ وَهِيَ دُخَانٌ فَقَالَ لَهَا وَلِلْأَرْضِ ائْتِيَا طَوْعًا أَوْ كَرْهًا قَالَتَا أَتَيْنَا طَائِعِينَ  

{ثم استوى} قصد {إلى السماء وهي دخان} بخار مرتفع {فقال لها وللأرض ائتيا} إلى مرادي منكما {طوعاً أو كرهاً} في موضع الحال، أي طائعتين أو مكرهتين {قالتا أتينا} بمن فينا {طائعين} فيه تغليب المذكر العاقل أو نزلنا لخاطبها منزلته.