Editor's note: This essay is part of an ongoing Deseret News opinion series exploring ideas and issues at the intersection of faith and thought.

Patriotism is affection for country. In the United States, it’s about fireworks and Fourth of July, serving one’s country, participating meaningfully in politics, and valuing liberty and justice for all. Nationalism, on the other hand, is the zealous identification with a cultural group, and it often devolves into an unrighteous sense of superiority over others and breeds a desire for dominance.

At the October general conference of The Church of Jesus Christ of Latter-day Saints, Elder M. Russell Ballard of the Quorum of the Twelve Apostles said, “We need to embrace God’s children compassionately and eliminate any prejudice, including racism, sexism and nationalism.” Elder Quentin L. Cook also of the Quorum of the Twelve Apostles said, “Anyone who claims superiority under the Father’s plan because of characteristics like race, sex, nationality, language, or economic circumstances is morally wrong and does not understand the Lord’s true purpose for all of our Father’s children.”

The last time an LDS apostle expressly condemned nationalism was in 1993 when, at the Parliament of World Religions, President Russell M. Nelson said, “We see evidences of increasing ethnic strife and hatred. Nationalism seems to be taking priority over brotherly love.”

I live 75 minutes from Charlottesville, Virginia. On Aug. 12, white supremacists went there for a rally. One of them drove his car into a crowd of counter-protesters, killing Heather Heyer, a Charlottesville resident. I know that racism and nationalism are problems worldwide, but the brazen racism of that day surprised and appalled me.

From the belief that “all are alike unto God” to the parable of the good Samaritan, Christ’s gospel teaches that we should not let differences of national origin, sex, wealth or color lessen our love for our fellow humans. If God loves all his children, then so should we.

But can we? It seems natural to love our benefactors and ourselves more than we love non-benefactors. If my country benefits me, patriotic feelings naturally follow. The same could potentially be said for my nation, should I have one. Also, contributing to a larger whole gives a sense of purpose, and my country or nation might be such a whole, even if most people on earth do not belong to it.

A country is a state, a political entity that, among other things, settles disputes among citizens, makes laws for their common life, and protects them from hostile individuals and countries. In the Latter-day Saint tradition, we believe that the United States, with its guarantee of religious freedom, provided fertile ground for the restoration of Christ’s gospel.

A nation is different from a country. A nation is a group with a shared ancestry and often a shared culture that may include a common language, religion and history, as well as shared songs, cuisine and art.

A person can be patriotic without being nationalistic, or nationalistic without being patriotic.

Many countries are nation-states — countries with populations drawn mainly from one nation. They include China, Japan, Greece, Poland and Egypt, among many others. Nations such as the Tamil people, the Kurds, the Uyghurs and the many native peoples of North America do not have political states of their own. Some countries such as the U.S., Australia and Canada host populations drawn from myriad nations and are not rightly called nation-states even though Americans refer to the republic as an indivisible nation under God during the Pledge of Allegiance.

It is possible to love one’s country while loving all humanity. It’s possible to be patriotic without becoming nationalistic. I am grateful for the political institutions in the U.S. that treat me as a free and equal citizen. I recognize with thanks the efforts of those who created them and of those who now maintain and improve them.

I am glad for citizens of other countries who benefit from similar institutions. But whether they have such political institutions or not, I have goodwill toward them and believe that all humans deserve a real chance at happiness. Goodwill is a kind of love.

While it is surely possible for a nation to be proud of its heritage and cultural achievements without coming to hate other nations, the fact is that obsessive identification with a nation has induced people to treat other nations as subhuman and to wish them gone or relegated to a secondary status. Nationalistic conflicts and feelings of ethnic superiority include, but are not limited to, race-based slavery in the antebellum United States, persecutions by German Nazis in the 1930s and 1940s, the breakup of Yugoslavia after 1989, the Rwandan genocide of 1994, and the persecution of Rohingas in today’s Myanmar.

The Book of Mormon narrative demonstrates the destruction that can occur when people divide into tribes and nations. After the Nephite government was destroyed in the Book of Mormon, the people divided into large tribes. After Christ’s visit, however, national and other differences disappeared for almost 200 years. Nations later reemerged and then fought each other until one side was wiped out.

President Dieter F. Uchtdorf, an apostle and the second counselor in the First Presidency of the LDS Church, recently spoke against hatred, saying, “In the year I was born, the world was immersed in a terrible war that brought agonizing grief and consuming sorrow to the world. This war was caused by my own nation — by a group of people who identified certain other groups as evil and encouraged hatred toward them. They silenced those they did not like. They shamed and demonized them. They considered them inferior — even less than human. Once you degrade a group of people, you are more likely to justify words and acts of violence against them. I shudder when I think about what happened in 20th-century Germany.”

I would like to think that there is kind of a patriotism that permits goodwill toward all people. I am not as hopeful for nationalism.