Secretary of State John F. Kerry speaks during a press conference with Indian Foreign Minister Sushma Swaraj in New Delhi on Thursday. This is Kerry's first visit to India following the election win of Prime Minister Narendra Modi in May. (Lucas Jackson/Associated Press)

— Washington is eager to work with India’s newly elected government to become “indispensable partners,” Secretary of State John F. Kerry said Thursday during a visit aimed at reinvigorating strained ties.

Kerry is the highest-ranking U.S. official to visit India since the landslide election in May of Prime Minister Narendra Modi. The U.S. government had denied Modi a visitor’s visa for almost 10 years because of his inability to stop deadly religious rioting in 2002 when he governed Gujarat state. A panel appointed by the Indian Supreme Court eventually concluded there was no evidence to charge him with a crime.

After Modi’s victory, Washington lost no time in warming up to him and extending an invitation to the White House.

Kerry’s visit was aimed at laying the groundwork for Modi’s planned visit to Washington in September and attempting to iron out the deep differences that have emerged between the U.S. government and India, Asia’s third-largest economy.

“There have been ups and downs in the relationship for some period of years, but much more ups and much more involvement over the past 10 to 15 years,” Kerry said at a news conference with India’s external affairs minister, Sushma Swaraj, after a four-hour discussion on issues including counterterrorism, clean energy, trade, Afghanistan and regional security. He added that “the moment has never been more ripe to deliver on the incredible possibilities of the relationship between our nations.”

He praised Modi’s focus on creating jobs, expanding economic reforms and improving efficiency in governance.

“The U.S. government is still trying to assess what the Modi government is all about, how much of a policy shift there will be, what will be the new priorities and how Washington can fit in the new landscape,” said Pranay Sharma, diplomatic editor of Outlook, an Indian news magazine. “This visit is to reiterate to the new government here that India is a friend and indeed an important partner.”

Relations between the two democracies have cooled in recent years after a period of dramatic improvement, which included the signing of a civilian nuclear agreement in 2008. That accord was expected to kick off billions of dollars of investment in both countries.

But American companies have struggled to ink contracts to build nuclear reactors here because of a tough liability law that the Indian Parliament passed in 2010. Some of the stringent clauses in the law were introduced by the Bharatiya Janata Party, Modi’s party.

Bilateral ties deteriorated last year after a nasty argument triggered by the arrest of an Indian diplomat in New York for alleged visa fraud.

Further complicating matters, in April, the U.S. government put India on a watch list of countries that it says are not sufficiently protecting intellectual property rights.

And in recent days, New Delhi has threatened to block a global deal in Geneva to reform customs rules until members of the World Trade Organization address India’s concerns about government stockpiling of food aimed at feeding its poor.

Kerry said the United States was encouraging India to find a compromise that met its concerns about food security while allowing the deal to go through.

Analysts in India said despite the feel-good signals of Kerry’s visit, it may not be easy to bring the relationship back on track quickly.

“There are too many areas of differences that only political will at the very top level can resolve,” said Kanwal Sibal, a former Indian diplomat. “We have a new government here that is ready to bring fresh energy to deal with all these issues. But unfortunately, [President] Obama cannot pay close attention to India right now. He is distracted by too many foreign-policy and internal political challenges.”