Narendra Modi, controversial Hindu leader, is his party’s nominee for Indian prime minister

New Delhi —India’s main opposition party on Friday chose controversial Hindu nationalist Narendra Modi as its prime ministerial candidate in parliamentary elections set for next year.

The choice of Modi, chief minister of the western state of Gujarat, was long expected but opposed by many even within his Bharatiya Janata Party (BJP). Several weeks of internal wrangling preceded Friday’s ceremonial announcement, at which the candidate was cheered and adorned with a garland of roses and jasmine.

Modi, 62, has won praise for turning Gujarat into an economic powerhouse and a magnet for foreign investment, but he comes with serious baggage, as many allege he did little to stop riots in his state in 2002 when hundreds of Muslims were killed.

For that reason, his official anointment Friday presents a fresh quandary for the United States, which denied him a visa in 2005 on the grounds that he had violated religious freedom during the riots.

U.S. officials have long said that Modi has not reapplied for a visa, so there is nothing to discuss.

“If Mr. Modi wants to apply for a visa and await a review like any other applicant, he is welcome to do so,” Marie Harf, a State Department deputy spokeswoman, said Friday.

Yet his past remains a source of deep controversy in the United States — an invitation for Modi to address the Wharton School’s annual India forum via Skype earlier this year, for example, sparked such a furor among rights activists and others that the school rescinded it.

A senior BJP leader, who spoke on the condition of anonymity because he is not authorized to comment on the issue, said the visa question could aid Modi in the long run.

“This is the world’s largest democracy. In what way will you justify denying him a visa or having a keep-off attitude? They will have to explain themselves,” he said. “The more the U.S. keeps saying, ‘Let him apply, we will evaluate it,’ the more it will benefit Modi here. He will make political capital out of this issue in the campaign.”

Although the official nomination came Friday, Modi has been acting like his party’s chief candidate for months. He delivered a rival address on India’s Independence Day in August, around the time Prime Minister Manmohan Singh, the quiet economist, gave his traditional address from Delhi’s historic Red Fort. He also launched the BJP’s national campaign tour last month.

Friday’s announcement effectively marks the official beginning of election season in India, although voters are not expected to head to the polls until April or May. Modi will lead the BJP against the governing Congress party, which has been mired in corruption scandals and charges of ineffectual governance. Its leader-in-waiting, Rahul Gandhi — the grandson of former prime minister Indira Gandhi — has said he isn’t even sure he wants the job.

During Friday’s announcement, Modi, wearing a lime-green high-collared jacket, sat quietly during introductions by party president Rajnath Singh. When it came time for him to speak, he referred to his modest beginnings. He was the son of grocers and ran a family tea stall as a teenager.

“Today the party has given a worker who hails from a small town and a modest family the responsibility to do a very important task,” Modi said. “I would like to appeal to the people to please give us the strength to get the country out of this crisis.”

Modi later met with L.K. Advani, a party patriarch who has withheld his blessing because, in part, he fears Modi’s past is too great a barrier to the party’s chances of establishing a successful coalition government next year. A BJP-led coalition last governed India from 1999 to 2004.