When the U.S. slaps a nation with punitive sanctions, it tries to prevent not only American companies from doing business with the target country but also those of other states. Inevitably, these extraterritorial effects hit some countries much harder than others -- as India has just found to its cost.

Even though New Delhi has been boosting ties with Washington for over a decade, it is a prime victim of two new sets of U.S. economic sanctions -- on Iran and on Russia. These two countries, now at the center of the current American foreign policy debate, are both long-standing economic and political partners for India.

Since New Delhi cannot suddenly wind down the relationships with them without jeopardizing its national security, it must consider carefully how to balance those interests with its growing strategic partnership with the U.S., a top trading and defense partner of India. Washington, for its part, should give maneuvering space to India, a key player in the U.S.'s biggest geopolitical game in the Indo-Pacific region -- reining in an increasingly muscular China.

Donald Trump's unilateral withdrawal from the multilateral Iran nuclear deal, followed by his globally applicable sanctions to choke the Iranian economy, has prompted calls for defiance even from Washington's close allies in Europe. The U.S. president's latest offer of direct talks with Iranian leaders may signal a wish to strike a deal but he is a long way off from lifting sanctions.

Extraterritorial sanctions are also at the heart of a new Russia-centered law passed by the U.S. Congress -- the Countering America's Adversaries Through Sanctions Act, or CAASTA. The law hits Russia where it hurts most, its defense and energy businesses.

India, a significant buyer of Russian weapons and the second-largest importer of Iranian oil after China, has been made acutely aware of the risks of aligning itself closer with the U.S.

In actual fact, America has overtaken Russia in recent years as the top arms seller to New Delhi, and also emerged as a source of oil and gas supply to India. But these evolving ties cannot at this stage replace India's links with Russia and Iran. The U.S. has basically transferred defensive military systems, while Russia has sold India offensive weapons, including a nuclear-powered submarine and an aircraft carrier. India also relies on Russian spare parts for maintenance of its Soviet-origin systems. Meanwhile, in oil, nearby Iran has long been one of India's top suppliers.

Even before the new Iran sanctions and CAATSA, questions were being asked in India about whether the pro-U.S. foreign policy pursued by successive governments since 2004 had yielded any concrete returns.

One telling point was the tense border standoff between Indian and Chinese troops on the remote Doklam plateau about a year ago, when Washington did not issue a single statement in India's support but chose to stay neutral, despite a fusillade of Chinese threats to teach India a "lesson." Many in India have come to believe that New Delhi can rely on an unpredictable and transactional Trump administration only at its peril.

In recent months, Prime Minister Narendra Modi has seemingly attempted to mitigate the risks from his open embrace of the U.S. by seeking to ease tensions with China and reverse a declining relationship with Russia. At his initiative, Modi held separate summit meetings with Chinese President Xi Jinping and Russian President Vladimir Putin in Wuhan and Sochi, respectively. These initiatives were seen in Washington as a subtle attempt to recalibrate ties with the U.S.

Since then, a realization that the new sanctions would be counterproductive to the U.S.'s relations with India and other key partners has led the Trump administration and Congress to separately climb down from their positions that there would be no sanctions exemptions.

Congress this week enacted CAATSA waivers for India and two other countries, while the administration, signaling a readiness to consider granting waivers, has walked back from its pointblank threat to impose sanctions on countries buying Iranian oil beyond its Nov. 4 deadline. The administration has yet to clarify the conditions or duration of any waivers.

However, the Iran-related sanctions, even before entering into force, have already increased the oil import bill of India, the world's third largest crude importer, by driving up prices.

India, while warning its energy companies of the risk of U.S. sanctions if they do not wind down their trade with Iran by early November, is pressing Washington for sanctions relief. In the previous round of Iran sanctions under Trump's predecessor, Barack Obama, India secured rolling six-month waivers from U.S. sanctions by showing that it was continuing to reduce its imports of Iranian oil. To sidestep the U.S. financial system, India had to pay Iran in its own currency and accelerate barter trade.

Under CAATSA, Congress deliberately set the bar for any presidential waiver very high so as to tie Trump's hands on the Russia sanctions. But after Defense Secretary Jim Mattis warned that "the sanctions will only drive strategic partners to buy more Russian hardware and prevent them from buying American in the future," Congress relented.

Significantly, CAATSA waivers are being granted for the three countries that Washington is trying to bring closer into its orbit -- India, Indonesia and Vietnam -- but not for Turkey, a NATO member that is, like India, buying the S-400 long-range air and anti-missile defense system from Russia.

U.S. pressure on India, Indonesia and Vietnam, however, is unlikely to fully dissipate because no blanket waivers are being granted. Congress has mandated that each country demonstrate that it is significantly reducing dependence on Russian arms or significantly increasing cooperation with the U.S.

The price the U.S. is seeking to extract from India for a waiver is its signature on two remaining "foundational defense agreements." After getting India to accept a logistics assistance pact, which includes access to designated Indian military sites, the U.S. is now pushing for India to endorse a secure communications accord (which the Indian military fears could compromise its network) and a geospatial intelligence agreement.

More fundamentally, the U.S. intends to influence the Indian, Indonesian and Vietnamese arms procurement policies. As Mattis told Congress, "we are faced with an once-in-a-lifetime opportunity to decrease Russia's dominance in key regions." Indeed, CAATSA was enacted with the intent to shift arms business from Russia -- an important weapons seller to China's potential adversaries, from India to Vietnam and Indonesia -- to the U.S., already the world's top arms exporter.

The Iran sanctions' impact on India could also impede its loudly touted transportation corridor to Afghanistan via Iran, which includes the Chabahar Port modernization project. This joint India-Iran project, which circumvents any need to cross Pakistani territory, highlights the strategic importance of Tehran for New Delhi.

U.S. foreign policy has long relied on sanctions, despite their uncertain effectiveness and unpredictable consequences. For example, crippling U.S. sanctions prompted Japan's 1941 Pearl Harbor attack, leading to the Pacific War that ended with the atomic bombing of Hiroshima and Nagasaki.

The newest Iran sanctions, which make China the likely main beneficiary by driving Beijing and Tehran closer together, also underscore the law of unintended consequences.

Ensnaring India in sanctions aimed at punishing Iran and Russia, and then dangling concessions, undermines the U.S. goal of developing a more robust defense relationship with the world's largest democracy and building a stable power balance in the Indo-Pacific. While the U.S. and India will remain close friends, Washington has gratuitously introduced a major irritant in the relationship that no waivers can fully purge.

Such unilateralism also highlights why the American-led strategy for a free, open and democratic-led Indo-Pacific -- aimed at containing China by cooperating with India and other partners -- has yet to acquire strategic heft.

Brahma Chellaney is a geostrategist and the author, most recently, of the award-winning "Water, Peace, and War."