Short answer
The Quran says Allah brought out the descendants of Adam from their loins and made them testify: "Am I not your Lord?" They said: "Yes, we have testified." This is the primordial covenant, often called the Day of Alast. It is one reason belief in Allah is part of human nature, the fitrah.
Al-Tahawi writes that the covenant Allah took from Adam and his offspring is true. Sunni scholars hold that it really happened, even though people do not remember it; the fitrah and the messengers remind them of it.
The four schools agree on this.
Explanation
Allah says: "And [mention] when your Lord took from the children of Adam, from their loins, their descendants and made them testify of themselves, [saying to them], Am I not your Lord? They said, Yes, we have testified. [This] lest you should say on the day of Resurrection, Indeed, we were of this unaware" (7:172). The Arabic for "Am I not" is alastu, which is why it is called the Day of Alast.
The Prophet ﷺ referred to it when describing a disbeliever on the Day of Judgement. Allah will ask him whether he would give the whole earth to ransom himself, and he will say yes. Allah will say: "I asked you for something easier than this while you were in the loins of Adam: that you would not associate anything with Me, but you refused."
Why don't we remember it? Scholars explain that the memory itself was not kept, but its mark was: the fitrah, the inborn sense that there is a Creator. The Prophet ﷺ said every child is born on the fitrah. Allah also sent messengers to remind people, so that no one can claim on the Day of Judgement that they never knew.
The Quran mentions other covenants too: with the prophets (33:7) and with the Children of Israel. But the covenant of Alast is the one every human shares. See do Muslims believe in original sin?, the purpose of life in Islam and tawheed.
The evidence
Quran, Surah Al-A'raaf 7:172
وَإِذْ أَخَذَ رَبُّكَ مِنۢ بَنِىٓ ءَادَمَ مِن ظُهُورِهِمْ ذُرِّيَّتَهُمْ وَأَشْهَدَهُمْ عَلَىٰٓ أَنفُسِهِمْ أَلَسْتُ بِرَبِّكُمْ ۖ قَالُوا۟ بَلَىٰ ۛ شَهِدْنَآ ۛ أَن تَقُولُوا۟ يَوْمَ ٱلْقِيَٰمَةِ إِنَّا كُنَّا عَنْ هَٰذَا غَٰفِلِينَ ﴿١٧٢﴾
And [mention] when your Lord took from the children of Adam - from their loins - their descendants and made them testify of themselves, [saying to them], "Am I not your Lord?" They said, "Yes, we have testified." [This] - lest you should say on the day of Resurrection, "Indeed, we were of this unaware."
The verse of the primordial covenant.
Sahih al-Bukhari 6557
Sahih... أَرَدْتُ مِنْكَ أَهْوَنَ مِنْ هَذَا وَأَنْتَ فِي صُلْبِ آدَمَ أَنْ لاَ تُشْرِكَ بِي شَيْئًا ...
"I asked you for something easier than this while you were in the loins of Adam: that you would not associate anything with Me."
Refers to the covenant taken in the loins of Adam.
Sahih al-Bukhari 1385
Sahih... كُلُّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ ...
"Every child is born on the fitrah."
Shows the inborn trace of that covenant.
Where the ruling is recorded
- al-Aqida al-Tahawiyya, Section on the covenant. States that the covenant Allah took from Adam and his offspring is true.
- Tafsir Ibn Kathir, Commentary on Surah al-A'raf, verse 172. Gathers the reports about the covenant and its link to the fitrah.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.