The Asia Reassurance Initiative Act showed growing US interest in further deepening ties with India amid common worries over the rise of China, said analysts.
They said the new law could even lead to enhanced military cooperation, including in the sale of defence equipment to India.
The Act "calls for the strengthening and broadening of diplomatic, economic and security ties between the United States and India" and "recognises the vital role of the strategic partnership between the United States and India in promoting peace and security in the Indo-Pacific region".
Indian Defence Minister Nirmala Sitharaman, in a tweet, highlighted parts of the law, including how it termed the "designation of India as a major defence partner" as "unique to India".
The Act noted that this designation in 2016 "elevates defence trade and technology cooperation between the United States and India to a level commensurate with the closest allies and partners of the United States".
Analysts said that the new US legislation was reassuring for India as US President Donald Trump seemed to remain constant on closer ties with India.
"For India, I personally think every time the US makes a statement it reassures India that Trump is not abandoning India amid unpredictability with its other close strategic partners," said former foreign secretary Lalit Mansingh.
"The US has two important interests in deepening ties with India. First to meet the potential threat of China and looking for a counterbalance (in India).
"Second is India as a market for US military technology."
Defence analyst P. K. Ghosh said: "The law is a reflection of closer ties which are being put on a firmer footing."