In line with the Qur'anQur'an 4:29 ↗يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ لَا تَأۡكُلُوٓاْ أَمۡوَٰلَكُم بَيۡنَكُم بِٱلۡبَٰطِلِ إِلَّآ أَن تَكُونَ تِجَٰرَةً عَن تَرَاضٖ مِّنكُمۡۚ وَلَا تَقۡتُلُوٓاْ أَنفُسَكُمۡۚ إِنَّ ٱللَّهَ كَانَ بِكُمۡ رَحِيمٗا
O you who believe! Do not consume each other’s wealth illicitly, but trade by mutual consent. And do not kill yourselves, for God is Merciful towards you.
The verse says do not kill yourselves, the same words the Prophet used to warn the crowding pilgrims.
In line with the Qur'anQur'an 2:195 ↗وَأَنفِقُواْ فِي سَبِيلِ ٱللَّهِ وَلَا تُلۡقُواْ بِأَيۡدِيكُمۡ إِلَى ٱلتَّهۡلُكَةِ وَأَحۡسِنُوٓاْۚ إِنَّ ٱللَّهَ يُحِبُّ ٱلۡمُحۡسِنِينَ
And spend in the cause of God, and do not throw yourselves with your own hands into ruin, and be charitable. God loves the charitable.
The verse forbids throwing oneself into destruction, matching the warning against deadly crowding.
In line with the Qur'anQur'an 2:203 ↗۞وَٱذۡكُرُواْ ٱللَّهَ فِيٓ أَيَّامٖ مَّعۡدُودَٰتٖۚ فَمَن تَعَجَّلَ فِي يَوۡمَيۡنِ فَلَآ إِثۡمَ عَلَيۡهِ وَمَن تَأَخَّرَ فَلَآ إِثۡمَ عَلَيۡهِۖ لِمَنِ ٱتَّقَىٰۗ وَٱتَّقُواْ ٱللَّهَ وَٱعۡلَمُوٓاْ أَنَّكُمۡ إِلَيۡهِ تُحۡشَرُونَ
And remember God during the designated days. But whoever hurries on in two days commits no wrong, and whoever stays on commits no wrong—provided he maintains righteousness. And obey God, and know that to Him you will be gathered.
The verse commands remembering God during the appointed days of pilgrimage, matching the takbir with each pebble.