Thomas Aquinas preaches that patriotism is a moral virtue and its absence is moral vice. Here’s an excerpt from Summa Theologiae (translation by Alfred J. Freddoso)
"A man becomes a debtor to others in diverse ways in accord with the diverse types of their excellence and the diverse benefits that he receives from them. In both these regards, God occupies the highest place, since He is the most excellent of all and the first principle of both our being and our governance. But in second place, the principles of our being and governance are our parents and our country, by whom and in which we are born and governed. And so, after God, a man is especially indebted to his parents and to his country. Hence, just as [the virtue of] religion involves venerating God, so, at the second level, [the virtue of] piety involves venerating one’s parents and country. Now the veneration of one’s parents includes venerating all of one’s blood relatives... On the other hand, the veneration of one’s country includes the veneration of one’s fellow citizens and of all the friends of one’s country."