When U.S. President Donald Trump last Sunday joined visiting Indian Prime Minister Narendra Modi's public rally in Houston, attended by 59,000 Indian-Americans and a number of U.S. congressmen and senators, it highlighted the growing closeness of the U.S.-India relationship. Trump shares with Modi a love for big audiences and theatrics.

Some saw Trump's rally attendance as a public-relations coup for Modi. In reality, the Houston rally was a win for Trump: it served as a backdrop to signing one of the largest liquefied natural gas supply deals in U.S. history and making progress toward a trade deal with India, which Trump said would happen "very soon."

With Trump's focus on getting reelected next year, the rally also enabled him to connect with wealthy and increasingly influential Indian-Americans, who now number about 4 million, or 1.3% of the total population. They not only matter in some of the swing states for the election, but also are important political donors.

But far from helping to turn the page on old rifts, such as over Pakistan, the booming bilateral trade and investment relationship -- symbolized by the rally -- has been accompanied by new economic and strategic differences.

Despite his bonhomie with Modi, Trump has been fighting a mini-trade war against India, albeit in the shadow of the much larger U.S.-China trade war. He has raised duties on 14.3% of India's exports to the U.S. and imposed a restrictive visa policy to squeeze the huge Indian information technology industry.

Indeed, no sooner had Modi's second term started in May than Trump announced the termination of India's preferential access to the U.S. market by expelling the country from the Generalized System of Preferences.

Trump has been rightly criticized for his mercurial behavior. But his move toward a trade deal with India, like his trade accords with Japan, South Korea, Canada and Mexico, show that Trump's negotiating strategy centered on punitive tariffs and drastic threats is yielding returns for America. A trade deal with Beijing, to be sure, remains elusive.

With U.S. policies backfiring to foster a partnership between the world's largest nuclear power, Russia, and second-largest economy, China, the strengthening American ties with democratic India assume greater importance for Washington. The latest U.S. national security strategy report says America welcomes "India's emergence as a leading global power and stronger strategic and defense partner."

India meshes well with Trump's export plan to create large numbers of well-paid American jobs. As Trump told the Houston rally, "we are working to expand American exports to India -- one of the world's fastest-growing markets."

India is also pivotal to Trump's policy of a "free and open Indo-Pacific," a concept authored by Japanese Prime Minister Shinzo Abe.

These imperatives and the powerful symbolism of the Houston rally, however, cannot obscure the challenges. Trump's unilateralism and transactional foreign policy reflect a belief that the U.S. can pursue hard-edged negotiations with friends without imperiling broader strategic ties or undermining efforts to balance China.

For example, not content with having emerged as the largest seller of arms to India, Washington is seeking to lock that country as its exclusive arms client by using the threat of sanctions to deter it from buying major Russian weapons, including the S-400 air defense system.

The paradox is that the U.S. regards India as the fulcrum of its Indo-Pacific strategy, yet the two countries' security interests diverge in India's own neighborhood. The farther one gets from India, the more congruent U.S. and Indian interests become. But closer home to India, the two sides' interests are divergent. Iran is just one example.

U.S. sanctions' pressure has driven up India's oil import bill by stopping it from buying crude from next-door Iran. Seeking to supplant Iran as a major supplier, the U.S. has ramped up oil exports to energy-poor India by 400% in the past 12 months. But it has been selling crude at a higher price than Iran.

A transportation corridor to Afghanistan that India is building via Iran, bypassing Pakistan, shows that New Delhi's relationship with Tehran is more than just about oil. U.S. policy, however, is pushing India out of Iran while letting China fill that space.

The Afghanistan-Pakistan belt is another example. Despite the recent collapse of a tentative U.S. deal with the Afghan Taliban, Trump is courting India's archenemy, Pakistan, even though it provides safe havens to the Taliban and is home to 22 U.N.-designated terrorist entities.

A Kashmir mediation offer was a red rag to India, yet Trump, seeking to win Pakistan's cooperation in Afghanistan, offered to mediate that conflict.

The looming trade deal, limited to some sectors, is unlikely to help fully lift U.S. pressure on India, whose economy is already slowing. Indeed, lumping the world's largest democracy with America's main strategic competitor, Trump is pushing to terminate India's and China's developing-nation status at the World Trade Organization.

India has been a U.S. foreign policy bright spot. There is strong bipartisan support in Washington for a closer partnership. At the Houston rally, Trump claimed India has "never had a better friend" than him in the White House.

Yet Trump's transactional approach, which prioritizes short-term gains for the U.S. even at the expense of long-term returns, could be reinforcing Indian skepticism about American reliability.

Brahma Chellaney is a geostrategist and author of nine books, including the award-winning "Water: Asia's New Battleground."