Though there has been no sign yet that big doors are closing internationally, the violence in New Delhi has clearly opened a new chapter of international questioning of Mr. Modi’s agenda, and, perhaps, of the investment climate in a country hoping to turn its weakening economy around. The current unrest threatens one of India’s biggest appeals for investors or potential allies: that it is the world’s largest secular democracy.

In private conversations, diplomats are worried that the rhetoric coming from Mr. Modi’s governing Bharatiya Janata Party is creating an environment that could lead to more violence. They point out that B.J.P. members have been labeling protesters and opposition supporters as terrorists who were supported by Pakistan. One minister led crowds in chants of “shoot the traitors!”

One area where international officials believe that India may be particularly hurting itself is in its campaign to be granted a permanent seat at the United Nations Security Council along with other nuclear powers. Speaking on condition of anonymity, several diplomats, including some from countries that have publicly pushed for an Indian seat on the Security Council, say that their governments are now reluctant to push the issue after India’s domestic unrest has laid bare the effects of Hindu nationalism there.

During his first campaign for prime minister in 2014, Mr. Modi downplayed his Hindu agenda. His first term was marked by an energetic foreign policy and alliance building. Domestically, he focused on development and economic reforms. He promoted himself as a globalizer and unifier, friends with everyone: the Israelis and Palestinians, the Russians and the Americans.

After winning a second term last year, Mr. Modi’s government prioritized issues that appealed to its Hindu-nationalist base, and the prime minister himself talked less about economic reform.

In August, the government scrapped the statehood of India’s only Muslim-majority state of Kashmir and locked up hundreds of its politicians and activists without charge. In December, the government approved a citizenship law that would expedite citizenship for every major religion in the region except Islam. Coupled with a citizenship test, observers worry the policies will disenfranchise India’s 200 million Muslims, 14 percent of the population.