When India's prime minister visits the United States this week, he'll see a welcome normally reserved for rock stars -- a sold-out appearance at Madison Square Garden. It's a stunning rise for a former tea seller who rose to the country's top job and was once denied a U.S. visa.

More than 18,000 people, most of them Indian-Americans, are expected to pack the New York City arena and thousands more watch on giant screens in Times Square as Narendra Modi makes a speech during his first visit to the U.S.

The trip comes on the back of a spectacular electoral victory that has catapulted Modi, once an international pariah for his alleged complicity in sectarian violence in his home state of Gujarat, to a leader the world is eagerly courting.

President Barack Obama was among the first Western leaders to call and congratulate Modi when his Hindu nationalist Bharatiya Janata Party swept into power in May.

Modi's acceptance of Obama's invitation also signifies that he has moved beyond the resentment of being denied a visa in 2005, three year after religious riots killed more than 1,000 Muslims in the western state where he was the top elected official.

"The prime minister is always looking forward, not back," India's foreign ministry spokesman Syed Akbaruddin said at a recent media briefing.

Modi is visiting at a time of strained U.S.-India relations, especially following last year's arrest and strip search of an Indian diplomat in New York on visa fraud charges.

With both sides hoping to reset that relationship, Modi's five-day trip starting Friday is tightly packed: He will be meeting Obama and a slew of top American officials, addressing the U.N. General Assembly, interacting with the heads of major U.S. companies and influential Indian-Americans.

At the heart of Modi's discussions with U.S. political and business leaders will be how the two sides can boost their respective economies, defense cooperation, the future of Afghanistan and the crisis in the Middle East.

When Obama visited India in 2010, he had called the U.S.-India relationship the "defining partnership of the 21st century."

Their ties since then have been lukewarm at best.

While military cooperation and U.S. defense sales have grown, and two-way trade is now around $100 billion, the economic relationship has been rocky. Washington has been frustrated by India's failure to open up its economy to more foreign investors and address complaints over intellectual property violations.

Despite a landmark civil nuclear agreement between the two countries, India's liability legislation has prevented U.S. companies from capitalizing on the nuclear deal.

Then last year, ties really frayed when Indian Deputy Consul General Devyani Khobragade was arrested and strip-searched in New York City, her treatment causing outrage back home. She was accused of lying on visa forms so she could bring her maid to the U.S. while paying her a pittance. Khobragade returned to India in January and has denied the charges, which are still pending.

Both Obama and Modi "want to repair the damage to the relationship in the last couple of years, and then to look at the future," said Lalit Mansingh, India's former ambassador to the U.S.

The fact that three top Obama administration members -- Defense Secretary Chuck Hagel, Secretary of State John Kerry and Commerce Secretary Penny Pritzker -- have visited New Delhi since Modi came to office is a sign of that Washington wants to woo a key ally in Asia, in part as a possible countermeasure to China's growing influence.

"I think the stage is set for the two leaders to say: The past is behind us and we need to look forward," Mansingh said.

Ever since assuming office in June, Modi has been working hard to establish clear foreign policy priorities. He visited India's long-ignored neighbor, Nepal, where China already has a strong presence, followed by high-profile meetings with Japan's Shinzo Abe and Chinese President Xi Jinping.

Backed by a strong mandate, Modi is telling the world that "we are now looking at partners in progress. America had been so far on the giving end," Mansingh said.

"In Modi, there is a desire to enhance the prestige of India," he said. "He will urge these countries to take India more seriously."