بِسۡمِ ٱللهِ ٱلرَّحۡمَـٰنِ ٱلرَّحِيمِ
Nationalism or patriotism are ideas or beliefs that espouse and promote love and loyalty to the country/nation and its citizens/subjects above other countries/nations, and people, generally within a political/geographical border.
Nationalism/patriotism does not take into consideration anything other than the national/political interests of such a nation, country or people, regardless of truth, justice, and loyalty according to Islamic teachings.
There is an element of bigotry/prejudice in such belief in that the citizens/subjects of such a nation are more deserving of our support, love and loyalty, irrespective of other considerations in judging matters, such as fairness, justice, truth, etc.
Therefore, nationalism and patriotism are kufr (disbelief) in Allah and His Messenger (ﷺ), in that such ideas reject/disregard verses from the Quran and the Sunnah (tradition) of the Prophet Muhammad (ﷺ).
First and foremost, nationalism/patriotism (as described above) would be a rejection of the following command from the Quran (in that nationalism/patriotism is a pledge of obedience to its principles/ideology). Allah says:
يَا أَيُّهَا الَّذِينَ آمَنُوا أَطِيعُوا اللَّهَ وَأَطِيعُوا الرَّسُولَ وَأُولِي الْأَمْرِ مِنكُمْ
O you who have believed, obey Allah and obey the Messenger and those in authority among you. And if you disagree over anything, refer it to Allah and the Messenger. 4:59
Nationalism/patriotism is a rejection of the verses of the Quran related to the unity and loyalty of the believers to one another (regardless of their location, race, nationality, language, etc.).
إِنَّ هَٰذِهِ أُمَّتُكُمْ أُمَّةً وَاحِدَةً وَأَنَا رَبُّكُمْ فَاعْبُدُونِ
Truly! This, your Ummah [Sharia or religion (Islamic Monotheism)] is one religion, and I am your Lord, therefore worship Me (Alone). [Tafsir Ibn Kathir] 21:92
وَالْمُؤْمِنُونَ وَالْمُؤْمِنَاتُ بَعْضُهُمْ أَوْلِيَاءُ بَعْضٍ
The believing men and believing women are allies of one another. 9:71
Furthermore, believing/adhering to the values, ideas and ideals of nationalism/patriotism is a rejection of the Sunnah (tradition) of our beloved Prophet (ﷺ) on this matter. The Prophet Muhammad (ﷺ) said:
مثل المؤمنين في توادهم وتراحمهم وتعاطفهم، مثل الجسد إذا اشتكى منه عضو تداعى له سائر الجسد بالسهر والحمى
“The believers in their mutual kindness, compassion and sympathy are just like one body. When one of the limbs suffers, the whole body responds to it with wakefulness and fever”.
To reject or to be averse to anything from the Quran, the Sunnah or the Sharia nullifies one’s Islam because Allah said:
وَالَّذِينَ كَفَرُوا فَتَعْسًا لَّهُمْ وَأَضَلَّ أَعْمَالَهُمْ
But those who disbelieve (in the Oneness of Allah Islamic Monotheism), for them is destruction, and (Allah) will make their deeds vain. (47:8)
ذَٰلِكَ بِأَنَّهُمْ كَرِهُوا مَا أَنزَلَ اللَّهُ فَأَحْبَطَ أَعْمَالَهُمْ
That is because they hate that which Allah has sent down (this Quran and Islamic laws, etc.), so He has made their deeds fruitless. (47:9)
The Prophet Muhammad (ﷺ) addressed the issue of nationalism in no uncertain terms.
مَنْ قُتِلَ تَحْتَ رَايَةٍ عُمِّيَّةٍ يَدْعُو عَصَبِيَّةً أَوْ يَنْصُرُ عَصَبِيَّةً فَقِتْلَةٌ جَاهِلِيَّةٌ
“One who is killed under the banner of a man who is blind (to his just cause), who raises the slogan of family or supports his own tribe, dies the death of one belonging to the days of Jahiliyya (pre-Islamic ignorance).”
Finally, nationalism/patriotism expects the individual to rejoice and celebrate national festivities, which is forbidden in Islam (to say the least) based on the following:
Narrated Anas ibn Malik: When the Messenger of Allah (ﷺ) came to Medina, the people had two days on which they engaged in games. He asked: “What are these two days (what is the significance)?” They said: “We used to engage ourselves on them in the pre-Islamic period.” The Messenger of Allah (ﷺ) said: “Allah has substituted for them something better than them, the day of sacrifice and the day of the breaking of the fast.”