Recently elected leader accepts invitation to Washington after being denied visa in 2005 over sectarian violence in Gujarat

Narendra Modi, the recently elected prime minister of India, has accepted an invitation from the US government to visit Washington later this year.

In 2005 Modi, who won a landslide victory in May, was denied a visa to the US under a 1998 law barring entry to foreigners who have committed "particularly severe violations of religious freedom".

The decision followed accusations that the former organiser for a rightwing Hindu revivalist organisation had stood by, or even encouraged rioters, during sectarian violence in the western state of Gujarat in 2002, when he was chief minister.

More than 1,000 people, largely Muslims, were killed in the episode which occurred shortly after Modi had taken power in the state. The 63-year-old has denied all wrongdoing and India's supreme court ruled in 2010 that there was insufficient evidence to back the charges against him.

The UK ended its boycott of Modi in 2012. The European Union swiftly followed, with the US ambassador only meeting the prime ministerial candidate for the first time earlier this year.

Close aides of Modi – a former tea-seller who came from humble origins to win power in a nation of 1.25 billion – have described how, around a year before his electoral victory, he rejected suggestions that he should lobby to end the visa ban and boycott, arguing that Washington would "come to him" when the time was right.

Modi's campaign stressed the importance of reinvigorating India's flagging economy and he is likely to place ambitions for greater commercial ties with the US before any personal resentment, analysts say.

"We don't really know what he feels personally, but the US has been working hard trying to woo India [since the election] so they've clearly understood there is a new game in town. The Chinese have also been very active," said Manoj Joshi, a security expert at the Delhi-based Observer Research Foundation.

US strategists have said it is hoped India would help counterbalance an increasingly powerful China both in the region and further afield.

However Modi, whose few trips abroad before taking power were largely confined to east Asia, has long had a good relationship with Beijing and is known to admire China's economic achievements.

Modi is likely to visit Washington in September, when he is due to attend the United Nations general assembly in New York.

As prime minister, Modi will be eligible for an A1 visa, state department officials have said. William Burns, the US deputy secretary of state, told reporters in Delhi on Thursday during a two-day visit to India, that Modi "has won a very strong mandate to reinvigorate India's development, and its rise on the world stage".

An official statement released by the Indian government said Modi "looked forward to a result-oriented visit with concrete outcomes that imparts new momentum and energy to India-US strategic partnership".

Relations between the US and India have long been rocky, though they have steadily improved since a nadir in the 1970s. Barack Obama received a warm welcome on his visit in 2010 when he described the two countries' shared interests as the foundations of "a defining partnership for the 21st century".

The two nations, however, rowed publicly last year over the arrest in New York of an Indian diplomat on visa fraud charges. The arrest prompted outrage in India and a range of retaliatory measures. While both New Delhi and Washington stressed the importance of their bilateral relationship during the crisis, it took weeks of complex wrangling to find a solution.

There remains deep suspicion of Washington in New Delhi, and in India more generally, and many US officials see India as a difficult partner.

"The US has difficulty accepting partnership with India and India sees itself as a major power and has sought a sense of equality," Joshi said. "Some members of the previous government had a strong streak of anti-Americanism, though it is now the time to move ahead there just aren't the high-level people [in Washington] to do that."