To understand the growing global threats to democracy, you only had to follow President Donald Trump’s two-day visit to India this week.

Here was the leader of the world’s most powerful democracy and the prime minister of its largest democracy, India’s Narendra Modi, embracing each other at a massive campaign-style rally in a 110,000 seat cricket stadium. Trump lapped up Modi’s flattery and basked in the spectacle of the rally in Ahmedabad, featuring dancers, singers, blaring music, cricket stars and Bollywood idols.

While this visit produced little substance, in better times it might have had huge symbolic significance. It could have advertised the virtues of the world’s two most important democracies in contrast to the authoritarian model of China.

Instead, these two leaders displayed their disdain for rule of law and their embrace of a virulent strain of populist nationalism that is infecting democracies around the world.

The visit took place against a backdrop of Hindu-Muslim riots in Delhi, provoked by Hindu nationalist Modi’s harsh discriminatory laws against Muslims. These laws could deprive millions of Muslims of their citizenship while fast-tracking the entry of non-Muslim migrants from neighboring countries.

Trump appeared blissfully ignorant of Modi’s controversial history and attack on the liberal principles upon which India was founded. Or perhaps he knew but didn’t care. (After all, India is home to the most Trump business ventures outside North America.)

He should have known that India was created as a secular state whose constitution prohibits discrimination on the basis of religion, language, race, ethnicity or gender. This was in sharp contrast to the founding of neighboring Pakistan, carved out of India after independence, which, to its enduring detriment, adopted a theocratic model.

Yet Modi’s Hindu nationalist Bharatiya Janata Party wants to adopt that religious-nationalist model and link citizenship to the Hindu religion.

Modi himself is a member of the radical paramilitary wing of his party, known as the RSS, which was inspired by European fascism in the 1930s. (An RSS member assassinated Mahatma Gandhi.) BJP officials encourage vigilante violence while attacking liberal journalists and using legions of media trolls to spread the message of Hindu supremacy.

In violation of India’s constitution, Modi took over the autonomous, largely Muslim Indian state of Kashmir last year and shut down the internet for months, while keeping the entire population under police curfew.

Rule of law proved no barrier to Modi’s military move.

And, in 1992, in the very city of Ahmedabad, where Trump embraced his rally, then-regional governor Modi was accused of promoting a massive pogrom that killed hundreds of Muslims. This massacre was so bloody that the United States refused Modi a visa for years.

I met up with this kind of Hindu fanaticism in 1998, when writing about the first Indian election in which the BJP won a national victory. In Mumbai, I interviewed Bal Thackeray, the leader of another fanatic Hindu movement called Shiv Sena, allied with Modi’s BJP party. Guarded by goons who lined up for blocks outside his home, draped in crimson robes, Thackeray bragged of how he had orchestrated anti-Muslim riots in Mumbai in December 1992. He told me that, if a fictional movie version of the riots didn’t meet his approval, he would shut any movie theater down that attempted showed it.

Such religious thuggery, now promoted by Modi, threatens to tear apart this vitally important, vibrant democracy and undermine its economic future. All across India, thousands of non-Muslims are protesting the new anti-Muslim laws.

Yet when asked by journalists about the religious violence in Delhi, and about the ugly new citizenship laws, Trump praised Modi’s commitment to “religious freedom” and said, “I really believe that’s what (Modi) wants.” As for Kashmir, “there are two sides to every story but they’ve been working on that very hard.”

Then the president went on to crazily misquote Modi as saying India went from 14 million Muslims “a short while ago” to 200 million now, as if Muslims had just flooded the country with caravans crossing the border. Yes, 200 million Indian citizens are indeed Muslim, but that is the number Modi is trying to dramatically shrink.

Then, displaying his real instincts, Trump segued into praise for his own travel ban, while falsely insisting it was “not a thing against Muslims.”

Two populists on a roll, each extolling his ability to exclude one religious category of immigrants, a move that excites their base.

But the worst came last. While in India, Trump could not resist continuing his tirade against the American judicial system, lambasting liberal Supreme Court justices, as he has done to judges, jurors, and prosecutors when verdicts don’t please him.

Two leaders praising each other, as each undermines rule of law in his own country. That was the image presented by the “leader of the free world” alongside the head of the world’s largest democracy, and it should make us all very, very sad.