What a difference a landslide victory makes.

In 2005, India’s Narendra Modi was denied a U.S. visitor’s visa because of concerns that he violated religious freedoms as a political leader. But since his party’s resounding win in national elections this month, the U.S. government has rushed to repair the breach.

President Obama called to invite Modi to Washington. Secretary of State John F. Kerry sent his regards. And after Modi’s swearing-in ceremony Monday as prime minister, Nisha Biswal, the U.S. assistant secretary of state for South and Central Asia, tweeted about the “wonderful celebration of democracy,” adding a cozy postscript about the dhokla snacks that were served — a specialty of Modi’s state.

But despite the warm messages, Modi’s ascent to prime minister throws a new element of uncertainty into a bilateral relationship that has frayed during the Obama presidency, analysts say. U.S. officials see India as a strategically located, thriving democracy of more than 1.2 billion people, with a growing economy and a huge potential for foreign investment.

But they are wary of Modi’s Hindu nationalist past — and they’re not alone. In Pakistan, a majority-Muslim nation that has gone to war three times with its nuclear-armed neighbor, officials have been concerned about anti-Muslim rhetoric from Modi’s supporters. Modi met Tuesday with Pakistani Prime Minister Nawaz Sharif, a sign that he was eager to put such fears to rest.

In the days to come, the U.S. government will have to overcome what Modi’s acquaintances call his deep sense of grievance with the United States for keeping him at arm’s length. Relations remained cold even after a panel appointed by India’s Supreme Court failed to find evidence to charge him with a crime in Hindu-Muslim riots in 2002, which were the source of U.S. concerns.

“With America, he may not readily show keenness, but he won’t let ties flounder, either,” said a senior official from Modi’s Bharatiya Janata Party, or BJP, speaking on the condition of anonymity because of the sensitivity of the subject. “He is not vindictive, but he will not forget, either. The embrace would not be immediate and spontaneous, and genuine warmth would be missing. The warmth shown for Japan and China may not be available for America. He may leave them guessing, and to that extent that America would have to worry.”

Shalabh Kumar, an Indian American businessman from Chicago, escorted a group of U.S. congressmen to Gujarat to meet Modi in 2013. Modi made it clear that he was not pleased with the way U.S. authorities were treating him, Kumar said.

“My impression was, he was not a happy man,” Kumar said.

‘We’ve had a crowded inbox’

In 1998, the United States imposed economic sanctions on India because of its nuclear testing. But two years later, President Bill Clinton traveled to India on a splashy goodwill tour, and both countries worked to improve ties. As India’s economy boomed, President George W. Bush made the country a priority and signed landmark defense and civil nuclear agreements with Prime Minister Manmohan Singh. President Obama visited in 2010 and told the Indian Parliament that the relationship would be “one of the defining partnerships of the 21st century.”

But the Obama administration’s strategic pivot to Asia, meant as a hedge against China’s growing power, has put the focus on other Asian nations, said Daniel Twining, a senior fellow for Asia at the German Marshall Fund of the United States. And in other regions, trouble spots such as Syria have occupied the administration’s attention. Meanwhile, Singh was absorbed with his country’s economy and corruption scandals.

“Obama hasn’t personally driven the India relationship,” said Twining, a State Department policy planner for Asia in the George W. Bush administration. “It hasn’t been central to us, and we’ve had a crowded inbox” of other issues.

India stunned the U.S. government and private sector in 2010 when it passed a nuclear liability bill that has impeded American investment. And the Singh administration’s retrospective tax law change in 2012 scared off investors.

In addition, the two countries are still grappling with the fallout from a junior Indian diplomat’s arrest in New York in December on visa fraud charges.

Recent course correction

Although it was clear to many in the business community that the “Modi wave” was fast approaching, U.S. officials were reluctant to reach out until he became the clear front-runner, according to Ron Somers, founder and chief executive of the India First Group, a strategic advisory firm that invests in India.

Modi, who had served as chief minister of the western state of Gujarat since 2001, had applied for and was denied a diplomatic visa for a planned trip in 2005 to meet with business leaders in Florida and New York. The State Department at the time said the application had been rejected on the grounds that Modi had violated religious freedoms in Gujarat by failing to act quickly to stop bloody rioting between Hindus and Muslims in 2002.

Modi has not applied for a visa since then, but his past has remained a subject of controversy in the United States. Last year, a plan for him to give the keynote address via video at a forum at the Wharton School at the University of Pennsylvania was scrapped over protests.

The State Department began its course correction in February, when the then-U.S. ambassador to India, Nancy Powell, met with Modi in his office in Gujarat’s capital and he presented her with roses as the cameras flashed. After his party’s sweeping victory, Obama effectively put the visa issue to rest by inviting Modi to Washington.

“[We] look forward to discussing with Prime Minister Modi and the new Indian government how the world’s oldest and largest democracies can continue our close partnership,” Biswal said in a statement.

“We have regular contact in Delhi and Washington with senior Indian government officials on all of our shared priorities. We have a long tradition of close engagement with both government and opposition leaders in India, including senior BJP officials, a number of whom are now in the new cabinet.”

Modi-watchers predict that he’s too canny to let the visa issue cloud relations, especially because he wants to revive India’s economic growth rate — which has plunged from 10 percent in 2010 to about 4 percent this year. American investment will be key to that turnaround, advisers say.

“As the economy picks up
and business ties grow, their relationship will thrive,” said G. Parthasarathy, India’s former ambassador to Pakistan and a Modi ally.

Among Modi’s top priorities will be repealing laws that appear to create an unfriendly climate for investors, such as the “counter­productive” policy of retrospective taxation, Par­thasarathy said. The controversial law allows India to retrospectively tax capital gains made by foreign companies.

Modi has long-established ties with leaders in Japan and China. Pakistan remains the wild card, with regional stability a crucial U.S. interest as troops leave Afghanistan this year. Pakistani officials say they view a Modi administration with trepidation, saying he lacks experience and citing the inflammatory remarks made by some other BJP politicians.

“Obviously, there are concerns,” said a senior Pakistani official before the vote was tallied, speaking on the condition of anonymity to be frank about diplomatic matters. “We only hope that rhetoric made during an election campaign would not be translated into reality.”

Rama Lakshmi in New Delhi and Shaiq Hussain in Islamabad contributed to this report.