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:9:3

And ˹it is˺ an announcement from Allah and His Messenger to the people on the day of the greater pilgrimage that Allah is disassociated from the disbelievers, and ˹so is˺ His Messenger. So if you repent, that is best for you; but if you turn away - then know that you will not cause failure to Allah. And give tidings to those who disbelieve of a painful punishment.  

A proclamation, a notification, from God and His Messenger to mankind on the day of the Greater Pilgrimage, the Day of Sacrifice (yawm al-nahr), that God is free from obligation to the idolaters, and their pacts, and ˹so is˺ His Messenger, also free from obligation: in that same year, year 9 ˹of the Hijra˺, the Prophet (s) sent forth ‘Alī, who proclaimed these verses on the Day of Sacrifice at Minā, and also ˹he proclaimed˺ that after this year no idolater will ˹be allowed to˺ make pilgrimage or circumambulate the House naked, as reported by al-Bukhārī. So, if you repent, of unbelief, it will be better for you; but if you turn away, from belief, then know that you cannot escape God. And give tidings to — inform — those who disbelieve of a painful chastisement, namely, ˹of˺ slaughter or capture in this world, and of ˹punishment in˺ the Fire in the Hereafter.
القرآن:٩:٣

وَأَذَانٌ مِنَ اللَّهِ وَرَسُولِهِ إِلَى النَّاسِ يَوْمَ الْحَجِّ الْأَكْبَرِ أَنَّ اللَّهَ بَرِيءٌ مِنَ الْمُشْرِكِينَ ۙ وَرَسُولُهُ ۚ فَإِنْ تُبْتُمْ فَهُوَ خَيْرٌ لَكُمْ ۖ وَإِنْ تَوَلَّيْتُمْ فَاعْلَمُوا أَنَّكُمْ غَيْرُ مُعْجِزِي اللَّهِ ۗ وَبَشِّرِ الَّذِينَ كَفَرُوا بِعَذَابٍ أَلِيمٍ  

(وأذان) إعلام (من الله ورسوله إلى الناس يوم الحج الأكبر) يوم النحر (أن) أي بأن (الله برئ من المشركين) وعهودهم (ورسوله) برئ أيضا "" وقد بعث النبي ﷺ عليا من السنة وهي سنة تسع فأذن يوم النحر بمنى بهذه الآيات وأن لا يحج بعد العام مشرك ولا يطوف بالبيت عريان "" رواه البخاري (فإن تبتم) من الكفر (فهو خير لكم وإن توليتم) عن الإيمان (فاعلموا أنكم غير معجزي الله وبشر) أخبر (الذين كفروا بعذاب أليم) مؤلم وهو القتل والأسر في الدنيا والنار في الآخرة.