“I love Hindu” was how Donald Trump put it, speaking to a cheering audience of Indian Americans at an election rally in 2016. “We are going to be best friends,” he added of his hopes for U.S. ties with India. “There won’t be any relationship more important to us.”

And yet, as with so often in the Trump era, things are not quite going according to plan.

Many U.S. foreign policy thinkers see India, the world’s largest democracy, as a crucial future balance against a rising China. And at first it appeared that Trump would go on to become an unusually pro-Indian president.

There was good reason to think so. For starters, the Trump Organization has deep ties there. With five buildings under construction, it is the company’s most important foreign market. Trump warmed to India’s controversial nationalist prime minister, Narendra Modi. And, in his own way, he seemed to admire Indian culture too—hence “I love Hindu.”

Lately, though, there has been a rough patch.

Earlier this month, Secretary of State Mike Pompeo and Secretary of Defense James Mattis suddenly canceled a big meeting with their Indian equivalents, to the great annoyance of New Delhi. Pompeo said he had to visit North Korea, but the Indians still viewed it as a snub. This added to complaints elsewhere, stretching from rows about intellectual property rights and Iranian sanctions to Trump’s desire to clamp down on Indian companies using U.S. tech visas. Most worrying is Trump’s rhetoric on trade, which threatens to draw India into a broader trade war.

These new U.S.-India frictions were not meant to be part of the plan.

Trump and Modi started out with a manly bear hug, as the two leaders embraced during India’s prime minister visit to Washington in mid-2017. Barely a year and a half later, Trump unveiled the concept of the “Free and Open Indo-Pacific” as a new cornerstone of U.S. foreign policy, designed to rope India more firmly as a counterbalance to China. “For scores of reasons, India needs to be central to what we do,” Pompeo said last month of Washington’s deepening ties with New Delhi.

Yet Trump’s affinity went deeper, given it’s now clear that Trump’s business heritage leaves deep imprints on his political judgment. Only last month he talked up a North Korean nuclear deal via a glowing assessment of the country’s future economic growth. “Think of it from a real estate perspective,” he told a press conference in Singapore after his summit with Kim Jong-un, extolling the commercial development potential of the country’s long shorelines.

These new U.S.-India frictions were not meant to be part of the plan.

More than any other market, India also embodies a change that came over Trump’s businesses at the beginning of this decade, as financial difficulties at home forced him to focus on licensing the Trump brand to buildings developed by real estate companies abroad.

Perhaps the most prominent of those, the 75-story Trump Tower Mumbai, now stands largely completed in a bustling midtown corner of India’s financial capital, even if its angular silhouette remained half-obscured when I visited last month by thick monsoon rains.

The 400-apartment building, which is being built by Lodha, a major Mumbai-based property group and one of the Trump Organization’s local partners, was officially “topped-out” earlier this year during a visit to the city by Donald Trump Jr. The golden “curtain-wall façade” planned for the finished building’s exterior, however, only currently reaches a little over halfway up.

If Trump’s Indian enthusiasm was partly a story about his own finances, it was also story about changes in India itself.

Having thrown off the shackles of British colonialism in 1947, the country’s leaders built a horrendously inefficient centrally planned closed economy. During that era the economy was largely closed to global trade, and the amount of goods companies could import and produce was strictly controlled by governments licenses, permits, and quotas—hence why it became known as the “license Raj.” That system ended only in 1991 as India reopened its economy, quickly growing much richer and more globalized in the process.

India’s middle class remains modest in size: Only around 8 million of the country’s 1.3 billion population earn more than $19,000 a year, according to research from French economist Thomas Piketty. But its super-rich have grown rapidly. India’s billionaire population ballooned from a handful in the mid-1990s to over 120 today, more than in any country bar the U.S. and China.

This is the face of a new India that I have called “The Billionaire Raj,” which is precisely what drew in the Trump Organization in the first place. A three-bedroom property in Trump’s Mumbai tower was recently listed at just over 70 million rupees ($1 million)—an unimaginable fortune for most Indians, although not outrageous in a city where premium properties often go for five times as much.

This new era of wealth had a dark side, as multibillion-dollar graft scandals rocked India during the late 2000s, roughly around the time Trump first began to seek potential partners. The Trump Organization has consistently denied any wrongdoing relating to its own Indian projects, although some of its local partner organizations have faced police investigations and allegations ranging from tax irregularities to fraud.

“Real estate in India is a notoriously complex and dirty business,” says Reuben Abraham, chief executive of the IDFC Institute, a Mumbai-based think tank. “With so many onerous regulations, it is hard to imagine any major property development succeeding without underhand deals of some sort.” (Spokespersons for the Trump Organization and the White House did not reply to requests for comment.)

The Trump family’s Indian business dealings come with diplomatic risks too, as demonstrated when Donald Trump Jr. touched down in New Delhi for his promotional tour earlier this year. Full-page advertisements greeted him splashed across the front pages of nearly every major daily newspaper: “Trump has arrived. Have you?” one asked, showing Trump Jr., arms crossed and unsmiling, promoting a condominium complex on the outskirts of New Delhi.

The problem arrived at a conference in New Delhi, where Trump Jr. was due to speak on a panel entitled “Reshaping Indo-Pacific Ties: The New Era of Cooperation.” Critics pounced: The family’s businesses are meant to be kept separate from President Trump’s administration, so was it not inappropriate for the president’s son, hardly a geopolitical expert, to be talking about the regional balance of power in such a venue? Sensing a diplomatic incident, the panel was swiftly stripped of its political content and rebranded as a mere “fireside chat.”

Rather than a conflict of interest, though, President Trump appears to think that his business dealings give him an inside track on what makes India tick.

“Mumbai is a place that I love, it is a place that I understand,” he said during his second trip in 2016.

In return, India has warmed to Trump too. “There is a certain section of Indian society who associate the Trump name with success,” one senior figure involved in a Trump-branded Indian development told me.

Polls show a steep Trump-era fall in U.S. popularity around much of the world. But Indians maintain a broadly positive view, according to Pew data showing roughly half viewing the U.S. favorably. Last year, one rural hamlet in the northern state of Haryana even renamed itself Trump Village.

There is then a strain within Modi’s Hindu nationalist Bharatiya Janata Party that sees a kindred spirit in Trump’s nationalism too.

In India, hard-line Hindus view their country’s traditional, secular, center-left elite with disdain. In Trump, by contrast, they see a fellow populist and strongman. Where Trump talks of “America First,” so Modi makes thunderous stump speeches talking about “India First” as well.

All this means mean U.S.-India ties are likely to grow far more complicated. Relations between two democracies have grown closer over recent decades, beginning in after India’s economic reopening in 1991. Both Presidents Bush and Obama tried to improve Indian ties via trade deals and military cooperation.

There is also an undeniable logic to this pro-Indian turn, not least because of China. If Asia’s future feature two great powers rather than just one, neither will dominate the Eastern Hemisphere as America has long dominated the West.

“America’s bet on India should be strategic, but Trump cannot see beyond the most recent transaction.” — Milan Vaishnav, Carnegie Endowment for International Peace

In many ways this idea has grown ever more compelling of late: As America’s quarrels with China grow more pronounced, from trade policy to the South China Sea, the more tempting it looks to draw India closer for balance. Last December the Trump administration officially took a further step in that direction, welcoming “India’s emergence as a leading global power” in its National Security Strategy.

Yet all of this simply makes Trump’s more recent rumblings the more self-defeating, beginning with moves to tighten H-1B visas for technology workers, which have often been used by Indian outsourcers. More recently there have been threats of possible “secondary sanctions” against India, if it continues to buy oil from Iran, one of its most important energy suppliers.

“India’s bilateral relations with Iran stand on their own and are not influenced by India’s relations with any third country,” said Gen. V. K. Singh, India’s minister of state for external affairs, in Parliament earlier this month—in effect politely telling the U.S. to back off.

Then there are growing disputes over trade flowing from Trump’s attempts to pressure China and rip up the existing global trading system. India has already introduced retaliatory steps against Trump’s recent tariffs on aluminum and steel. Trump has complained about Indian tariffs on Harley-Davidson motorcycles in return.

As a still-poor country, India wants the kind of international stability that will allow its economy to grow. Broadly speaking, Modi backs the current global order that Trump is tearing down. The more that destruction continues, the weaker ties between the U.S. and India are likely to become.

Raja Mohan, one of India’s most respected foreign policy analysts, put his finger on the brewing anti-U.S. mood swirling around New Delhi in a recent article. “For many in India, it is tempting to align with Trump’s critics, at home in America and his allies in Europe and denounce the US president’s disruptions,” he wrote.

This should be an alarming warning. India is not a formal U.S. ally and is unlikely to become one, at least partly because New Delhi understands only too well that it should not needlessly antagonize China. It can be a prickly country to deal with.

“America’s bet on India should be strategic, but Trump cannot see beyond the most recent transaction,” said Milan Vaishnav of the Carnegie Endowment for International Peace. “Asking ‘what have you done for me lately?’ will lead to bad outcomes when it comes to India.”

The notion of a long-term formal alliance between the world’s two great democracies is fanciful. But closer and warmer ties should be in the best interests of both nations, especially as China slides toward a worryingly autocratic future.

Actually making this happen looks increasingly tricky. Speaking just before Trump’s trip to Asia last year, former Secretary of State Rex Tillerson made the most pro-India speech given by any senior American official in recent memory. “We’ll never have the same relationship with China, a non-democratic society, that we can have with a major democracy,” Tillerson said.

Yet the risk is that if Trump continues in his current vein, the U.S. will find democratic India turning against it as autocratic China has already done—in effect wrecking relations not just with one emerging Asian giant, but two.