When Prime Minister Shinzo Abe’s Cabinet approved the use of the Imperial Rescript on Education last month as teaching material in schools, it ignited an emotional debate that is not likely to die down anytime soon. Although the issue involves a 19th century Imperial edict in Japan, a battle no less intense is taking place in the United States.

To understand the similarities, it’s necessary to put the issue in proper context. Patriotism in both Japan and the U.S. means love of country. Despite its politically incorrect connotation today, it’s essential in any democratic society. It promotes such acts as voting, enlisting in the military, and participating in social movements.

The Diet’s unanimous declaration in 1948 that the edict was null and void was understandable in light of history. Japan had only three years earlier surrendered, putting an end to World War II. The edict’s positioning of the emperor over his “subjects” was seen as inherently antithetical to the new democratic society being established.

But Japan has undergone far-reaching changes since that time. It is one of the world’s great powers, whose people have distinguished themselves by their work ethic and ethical values. As a result, it’s hard to believe that promoting patriotism can be harmful in this environment.

That does not mean denying or minimizing the facts of history taught in school to young people. On the contrary, inculcating genuine patriotism requires acknowledging a nation’s faults. Otherwise, it amounts to instilling chauvinism via indoctrination.

The U.S. is undergoing a similar debate most recently triggered by President Donald Trump’s slogan during the presidential campaign to “Make America great again.” He wants to change the curriculum with the goal of “promoting American pride and patriotism in America’s schools.” To do so, Trump said he will work with the American Legion to “uphold our common values and to help ensure they are taught to America’s children.”

It was the Vietnam War that first undermined the teaching of patriotism in schools. Until then, teaching patriotism was taken very seriously. The school day began with the Pledge of Allegiance to the flag, which hung in the front of every classroom. Students learned the songs associated with patriotism, including the national anthem, “God Bless America,” and “America the Beautiful.”

Few people objected to these acts of patriotism because they believed in e pluribus unum. But the start of immigration from developing countries beginning in earnest in the late 1970s shifted the role of schools to teaching multiculturalism. Today self-esteem and pride in one’s ethnic and racial roots take precedence over national identity. It’s a mistake that will only balkanize a nation.

Neither Japan nor the U.S. can afford to whitewash their unique histories if they expect to retain the trust of young people. The truth is that the hands of neither nation are completely clean. Japan has its modern wars to live down, and the U.S. has slavery as an indelible stain.

Textbooks that fail to present the unvarnished facts only serve to generate cynicism and alienate young people. They have access to information and images that were not available to their peers decades ago. As a result, they are far more sophisticated.

Social cohesion for all generations is best achieved by admitting the errors of the past without attempting to downplay them. Anything else is ultimately counterproductive. But diehards in both Japan and the U.S. have dug in their heels. The result will be endless battles, particularly if the threat of terrorism intensifies.

Walt Gardner taught in the Los Angeles Unified School District for 28 years. He writes the Reality Check blog for Education Week.