JAKARTA, Indonesia — Two countries cannot be further apart than Indonesia and the United States. Geographically, they are at opposite ends of the globe, and their people are ethnically different and they have different levels of economic development. But there are similarities. Both are extremely large countries with highly religious populations — most in the U.S. are Christian and most in Indonesia are Muslim. And both countries are experiencing significant change in their societies.

When Barack Obama became president in 2009, he called for “change we can believe in” and he personified this change in American society. As the first black American president, many saw his presidency as a decisive victory for civil rights and cheered him on when he pushed for serious socioeconomic changes. But a sizable part of the population disagreed, feeling that Obama was undermining fundamental American values grounded in a strong Christian faith.

In 2014, the year after Obama took the oath of office for his second term, Basuki Tjahaja Purnama became governor of Jakarta, Indonesia’s capital. Purnama is Christian and ethnically Chinese in a predominantly Muslim city. His bold policies to clean up the city administration, build infrastructure and aid the poor were widely supported, but he met with strong resistance when he ran for a second term in 2017. Many felt he was undermining Muslim values.

Barcroft Media via Getty Images Purnama arrives at a courtroom at the conclusion of his blasphemy trial in Jakarta on May 9.

Obama was followed by Donald Trump in the U.S., and in Indonesia hard-line Islamists got Purnama convicted on trumped-up blasphemy charges. Reactive populism has become a decisive force in both countries.

The cases of Obama and Purnama illustrate the forces of change that are sweeping though some societies across the globe. They are propelled by a global urban consumer class that expects benefits from this change. Strong resistance comes from those who fear to lose out.

Who are those people whose fear makes them prone to the rhetoric of populism? Who are those who feel vulnerable and fear that change could marginalize them?

What American right-wing populists and Indonesian Islamists have in common is their sense of deprivation, the feeling that they are losing power and drifting into a marginalized existence.

In the U.S., Harvard economist Dani Rodrik blames the economics of globalization. In a recent paper for the National Bureau of Economic Research called “Populism and the Economics of Globalization,” he finds that populism speaks to those who have suffered job and income losses due to international competition and trade. Indeed, both Trump and Bernie Sanders claim to represent those who have lost their livelihood in the modern, globalized economy and blame the political establishment for colluding with powerful international business conglomerates. The two differ in their vision of social norms and values: Trump mostly reaches a more rural, conservative group, while Sanders has the support of more urban, progressive voters.

In Indonesia, Islamists like Rizieq Shihab, the leader of the Islamic Defenders Front, and authoritarian populists like Prabowo Subianto, a former lieutenant general who ran against Joko Widodo in the 2014 presidential election, joined forces and backed a popular campaign against Purnama in this year’s gubernatorial election. Like other populists, they blamed the establishment for enriching itself and abusing its power, and they claimed to represent a disenfranchised community (Muslims).

Their campaign grew from fertile ground, even though democracy and globalization have benefited many Indonesians. Since the beginning of the democratic era 20 years ago with the resignation of Suharto, the poverty rate in Indonesia has fallen from 24 percent to just over 10 percent and the population increased from 200 million to 260 million. Life expectancy expanded from 66 years to 70 years and people now enjoy better access to education, healthcare and basic social services.

Anadolu Agency via Getty Images Neo-Nazis and white supremacists march through the University of Virginia campus in Charlottesville, Virginia on Aug. 11.

In Indonesia, it is neither directly the result of global trade or migration but the resistance against changing values and lifestyles that resulted in the backlash against Purnama and his eventual imprisonment. Observers sometimes reduce his fate to an anti-Chinese or anti-Christian sentiment, but it is better explained by a large discomfort with the fact that norms are changing.

Modernization deprives traditional (mostly male) leaders of their positions of power. Gender equality is the most immediate threat and Islamists all over the world fight against the ascent of women into powerful positions of society. Besides women, there are other people who claim equal rights and power. Whether it’s homosexuality or other faiths, Islamists share a general fear of anything perceived as heretical, heterodox and undermining patriarchal values. The Islamist opposition against Purnama falls in this category. It must be seen in the same light as the increasing acts of violence against the LGBTQ community and growing religious intolerance in Indonesia. The usual and recurring argument of the offenders is that they claim to defend the rights and values of Muslim society.

There is very similar to what happened in Charlottesville, Virginia, in August. White supremacists rallied to claim their dominance and privileges over people of color and other faiths. The Washington Post interviewed several of the activists and reported: “They felt silenced and censored, deprived of their rights.” In Indonesia, Islamists also fight for their dominant privileges over people of other colors and faiths.

Populism feeds on the fear of those who feel disenfranchised and who sense a loss of power to set and maintain norms and values in society.

What American right-wing populists and Indonesian Islamists have in common is their sense of deprivation, the feeling they are losing power and drifting into a marginalized existence. They are also mostly male and equally disconcerted by the empowerment of women. They feel their powers are being marginalized and they want to restore values and norms they perceive as eroding.

In the end, populism feeds on the fear of those who feel disenfranchised and who sense a loss of power to set and maintain norms and values in society. They fight new global rules that equalize opportunities across the borders of nations, gender, class and ethnicity. These new rules erode traditional positions of power and populists use the resulting fears for their campaigns.

It is no surprise that the dissent is often stronger in the countryside — all over the world there is a cultural divide between urban and rural cultures. Both sides look down on each other. Both maintain their culture is superior. However, the forces of globalization are mostly urban, technological and international. The global trend towards urbanization signifies the victory of the city over the periphery. And those who lose their power to maintain their norms are angry.

AFP via Getty Images Rizieq Shihab, the head of Islamic Defenders Front, arrives in court to testify in Purnama's blasphemy trial. Feb. 28.

The Wall Street Journal, paraphrasing Tom W. Smith from the University of Chicago, reports that “cities’ welcoming attitudes toward immigrants from abroad, same-sex marriage and secularism heighten distrust among small-town residents with different values.” Last year, these rural folks formed a critical mass and put Donald Trump in the White House. Trump’s call to “make America great again” was directed at their feeling of losing the right to set and defend their own norms and values.

Academics often refer to the rural-urban divide, but the great divide today lies between the global forces of social and technological change versus a traditional interpretation of social norms. The former appears to be winning. But the latter is putting up a strong resistance. Representative democracies like the U.S. and Indonesia are particularly vulnerable to political populism where the fight goes to ballot boxes and can put populist leaders in power. Recent elections in France and the upcoming one in Germany give us hope that reasonable voters will eventually prevail. There is no reason why this should not also happen in the U.S. and in Indonesia.