In an extended speech celebrating the two countries' relationship, he noted that their close ties reflect deeply shared values.
"The traits of freedom and liberty form a strong bond between our two democracies," said Modi, who was greeted by almost three minutes of applause on entering the House chamber. "Our nations may have been shaped by diverse histories, cultures and faiths, yet our belief in democracy for our nations and liberty for our countrymen is common."
"As a representative of the world's largest democracy, it is indeed a privilege to speak to the leaders of its oldest," Modi said.
It would have been hard to imagine three years ago, when U.S.-India relations were in tatters over the arrest and strip search of an Indian diplomat in New York for visa fraud and underpaying her housekeeper. Modi wasn't even permitted to enter the U.S. then, censured for failing to stop the 2002 mass killings of Muslims in the Hindu-majority state he led at the time.
With the Indian leader's election in 2014, the tide has definitively turned -- thanks to determined effort, a growing strategic alignment and the striking odd-couple chemistry between the barrel-chested, bear-hugging Modi and his cool, often restrained American counterpart, President Barack Obama.
Modi, the fifth Indian prime minister to address a joint session of Congress, was interrupted throughout by applause from lawmakers who increasingly see in India a democratic counterweight to China in the Asia Pacific. Modi's repeated references to India's commitment to freedom and democracy served as a reminder that his country offers the U.S. a like-minded partner in an increasingly unsettled region. And that it provides Asia with a model for development and progress more compatible with U.S. values.
"No wonder that the shared ideals and common philosophy of freedom shape the bedrock of our ties. No wonder that President Obama called our ties the defining partnership of the 21st century," Modi said.
Secretary of State John Kerry has said that the U.S. may now do more with India on a government-to-government basis than virtually any other nation. Modi's visit is meant to celebrate that achievement and cement it as this U.S. administration prepares to give way to a new one in 2017.
"This trip is both a love fest and a sales pitch," said Michael Kugelman, a senior associate for South Asia at the Wilson Center.
Modi's goal -- and Obama's -- will be "to highlight the rapid progress made in U.S.-India relations in recent years and to underscore the importance of maintaining the current momentum in relations against a backdrop of changing U.S. leadership," Kugelman said.
Points of friction remain
There are points of friction between the world's two largest democracies, to be sure, with India chafing at U.S. pressure to do more on climate change and human rights, while U.S. lawmakers complain about India's slavery, its loose approach to intellectual property and limits on foreign investment.
Modi raised some of these testier issues with a light enough touch that lawmakers laughed when he said that even though more Americans practice yoga than know how to throw a curve ball, India has yet to claim intellectual property rights on the ancient practice.
He teased the lawmakers, telling them he'd heard about the smooth bipartisan cooperation in Congress -- and that he saw the same thing in India. And he sprinkled his remarks with references to American cultural icons such as Abraham Lincoln, Walt Whitman and Martin Luther King -- men who fought for and celebrated freedoms.
Modi's deft performance likely means complaints will be on the back-burner during his visit to Capitol Hill. After his speech, he is being feted by the House and Senate foreign relations committees and a lawmakers' India Caucus.
Both sides emphasize that the story of the last few years has been one of constructive progress and shared priorities. That's a function of China's rise, the threat of terrorism and the Obama administration's decision to focus resources and attention on Asia. It also reflects the both leaders' recognition that their countries will benefit from closer alignment.
Numbers back the narrative. U.S.-India trade has soared from $60 billion in 2009 to $107 billion in 2015, while American defense contractors are now selling India $14 billion worth of equipment, an increase from $300 million less than a decade ago.
Defense and security cooperation in particular are "an area of extraordinary progress and ambition in both countries," Assistant Secretary of State for South and Central Asian Affairs Nisha Biswal told a Senate committee in May. She said the two countries' military exercises had grown in scope and complexity. Unspoken but implicit was the fact that they've grown more important, too.
As China increasingly takes steps to establish claims to contested areas in the South China Sea -- through which about half the world's merchant ships sail -- the U.S. has been placing increasing emphasis on the need to maintain freedom of navigation.
"India has an important role to play as a net security provider and guarantor of an open and rules-based maritime order across the Indo-Pacific," Biswal said.
Modi made clear that India is more than ready to do that. "India is already assuming responsibilities in securing the India Ocean region," he said. "A strong India-U.S. partnership can ensure peace prosperity and stability from Asia to Africa and from Indian Ocean to the Pacific," he said.
In an indirect reference to China, he also touted his country's "respect for global commons and for international rules and norms."
China spurs U.S.-India ties
The forces drawing India and the U.S. together go beyond China, though. Both countries see a destabilized Afghanistan and terrorism in Pakistan and beyond as sources of concern. Kugelman says that increasing U.S. impatience with Pakistan's tolerance for certain militant groups also benefits ties between the U.S. and India, which views the Muslim country on its border as its biggest foe.
Pointing to the U.S. drone strike inside Pakistan that killed Taliban leader Mullah Mansour, Kugelman said, "I think what we're seeing in the last few months is the case of the U.S. losing patience with Pakistan."
Modi touched those bases, too, speaking of the need to stabilize Afghanistan and going after India's rival and neighbor, though not by name. He told lawmakers that terrorism is "incubated in India's neighborhood."
He urged greater U.S.-India counterterrorism cooperation and "greater isolation for those who harbor, support and sponsor terrorists."
He points to the close ties between Pakistan and China as another factor. "The Obama administration is very intent on completing this rebalancing to Asia," Kugelman said. "That entails a very significant role for India, and there's simply no role for Pakistan because Pakistan is a very big ally of China."
As a result of all this, "suddenly India begins to look like a better partner for the U.S., and the U.S. looks like an invaluable partner for India," said Sadanand Dhume, an American Enterprise Institute expert on India.
Under the tenure of Obama and Modi, that dynamic has been turbo-charged. Obama has made two visits to India, the most by any sitting president. Obama has backed India's inclusion on the UN Security Council and in multilateral export control regimes, said Singh, who noted advances made in defense, trade and economic partnerships as well.
Meanwhile, Modi's current visit marks his seventh meeting with Obama in the U.S. and abroad.
Over the course of those visits, the Indian leader has made a deliberate shift, said Dhume. "What Modi has done is made clear that a large country with a tradition of non-alignment is, under this prime minister, moving decisively toward a deeper relationship with the U.S.," Dhume said.
India had historically allied itself with the Soviet Union and then Russia, along with Brazil and China, as part of a group of countries that wanted to stay out of the U.S. orbit.
The bilateral relationship has gotten an extra boost from the chemistry the two leaders share. Raymond Vickery, who worked on U.S.-India trade as an assistant secretary of commerce under President Bill Clinton, attributed its roots to their similar backgrounds.
"Both Obama and Modi have spent most of their lives as outsiders," said Vickery, a global fellow at the Wilson Center. "They've both come to power with a common vision of being able to have a U.S.-India relationship that's worldwide in scope."
U.S.-India ties aren't dependent on personal chemistry, though, Dhume said. The long, slow deepening links between the two countries is about "the importance of India, much more than the importance of Modi," he said, referring to its strong economy, positive trade and defense relationships and its status as a democratic model for the region and counterweight to China.
"India matters, no matter who is the leader," Dhume said.