NEW DELHI — On the margins of a summit meant as a show of force for a Russian leader seeking a turnaround on the battlefield, Prime Minister Narendra Modi of India leaned in with a different message.

“Democracy, diplomacy and dialogue” — not war — is the answer, he told Vladimir V. Putin as the cameras rolled this month, before declaring that the two would speak more about how to bring peace in Ukraine.

That assured interaction in Uzbekistan was the latest display of India’s rise under Mr. Modi. An ambitious and assertive power, India has become increasingly indispensable in the search for answers to some of the world’s most pressing challenges, from diplomacy to climate change to technology and trade to efforts at diversifying supply chains to counter China.

It is India’s credentials as the world’s largest democracy that Mr. Modi rides on the global stage. But at home, diplomats, analysts and activists say, Mr. Modi’s government is undertaking a project to remake India’s democracy unlike any in its 75 years of independence — stifling dissent, sidelining civilian institutions and making minorities second-class citizens.

While past Indian leaders exploited religious divisions and weaponized institutions to stay in power, Mr. Modi’s focus has been more fundamental: a systematic consolidation of power, achieved not through dramatic power grabs but through more subtle and lasting means, aimed at imprinting a majoritarian Hindu ideology on India’s constitutionally secular democracy.

Mr. Modi has bent to his will the courts, the news media, the legislature and civil society — “referee” institutions that guarded India’s democracy in a region of military coups and entrenched dictatorships. As he has done so, the country’s indispensability on major global issues, coupled with challenges to democracy in both the United States and Europe, has ensured little pushback from Western allies.

The question now for both India and the world is whether the country can remain an engine for growth and a viable partner even as its heavy-handed marginalization of minorities, particularly its 200 million Muslims, stokes cycles of extremism and perpetual volatility at home.

The contradictions of India’s rise were crystallized in late June, when Mr. Modi stood alongside the Group of 7 leaders in Germany as his public relations team worked to document his seeming intimacy with his counterparts: a shared laugh with President Biden, an interlacing of fingers with Justin Trudeau of Canada.

But just as Mr. Modi was joining his hosts in signing a statement urging the defense of democracies and affirming ideals like “freedom of expression” and the “independence of civil society,” his government was continuing a crackdown on dissent back home.

The Indian authorities arrested an activist critical of the prime minister’s past record on human rights and a fact-checker who had highlighted disparaging comments about Islam by a governing party spokeswoman. Days earlier, officials had again rolled in bulldozers to raze the homes of Muslims as part of a campaign of “instant justice,” this time targeting activists accused of leading sometimes violent protests against the provocative remarks.

For now, Mr. Modi’s focus is on leveraging India’s strengths. As the global order has been disrupted by Covid, the Russian invasion of Ukraine and an expansionist Beijing, Mr. Modi’s lieutenants have made clear that they see this as their moment to establish India, on their own terms, among the foremost powers.

India is a rising economic force, having just passed Britain, its onetime colonial overlord, as the world’s fifth-largest economy. It is well positioned to prosper with its improving trade ties, large youth population and expanding technological infrastructure — a potential alternative, in the eyes of some democracies, to a future dominated by China.

Mr. Modi’s diplomats are emboldened to overcome seeming contradictions, like holding military exercises with both Russia and the United States and increasing purchases of Russian oil despite American and European pressure.

India’s Western allies have shown little appetite to challenge the Modi government as it diverges from some of their professed democratic values.

A focus on trade and geopolitics has often pushed human rights to the back burner, analysts and diplomats said. With the European Union fast-tracking negotiations on a free-trade agreement with India, the talk is all “this deal, this deal, this deal,” one European diplomat in New Delhi said.

The United States, which two years into the Biden administration still does not have an ambassador in New Delhi, is reeling from former President Donald J. Trump’s assault on its democratic system. Its seriousness about a foreign policy that prioritizes human rights was questioned as the quest for cheaper oil took Mr. Biden this summer to Saudi Arabia, where he fist-bumped with the crown prince implicated in a journalist’s murder and dismemberment.

“The U.S. also has lost some of its authority to criticize other countries on their records on democracy,” said Lisa Curtis, a former senior U.S. national security official who leads the Indo-Pacific Security Program at the Center for a New American Security.

In many ways, diplomats, officials and analysts said, India’s rise brings together two unique developments: a natural opening in the country’s often-uncertain post-colonial trajectory, and the emergence of a leader at the peak of his power who has spent half a century pursuing his vision from the ground up.

After India’s violent founding as an independent nation in 1947, the country remained consumed for decades with questions of whether it would remain intact and whether its economy could feed an enormous population. The moment to define itself, and its relations with the world, has come only after those questions have largely been settled.

Mr. Modi, 72, has spent his life in the trenches of a right-wing movement that calls India’s founding as a secular republic a grave injustice that accommodated minorities like Muslims and Christians at the cost of what they see as the Hindu majority’s rightful claims.

Mr. Modi’s political consolidation at the top, coupled with extensive welfare projects to maintain a strong voting base, has given India’s right wing its most effective formula yet to bring about the cultural and systemic changes the movement has long fought for on the streets.

The country’s central investigating agencies have become willing levers of intimidation against dissenting voices, analysts say. Journalists and activists face frequent harassment, mired in lengthy court cases or thrown in jail under laws that make bail difficult. Independent institutions — from courts to Parliament to the national human rights commission and the elections body — have been overwhelmed or have largely retreated, as the compliant are rewarded and detractors are punished.

Mr. Modi is not the first Indian leader to capture institutions and unleash them at political opponents, said Josy Joseph, who has chronicled a long history of abuses in his book “The Silent Coup.” The closest the country’s democracy has come to fracturing was in the 1970s, when Prime Minister Indira Gandhi declared an emergency to jail opponents and censor the media in a bid to remain in power.

Mr. Joseph said Mr. Modi had been much more effective than Mrs. Gandhi in achieving his aims, aided by an unparalleled propaganda operation — allied broadcast media and newspapers, and a social media machine reaching into every phone — that provides cover both at home and abroad.

Mr. Modi and his Bharatiya Janata Party “have very cleverly combined India’s traditional democratic credentials and autocratic controls,” Mr. Joseph said.

Gopal Krishna Agarwal, a B.J.P. spokesman, attributed criticism of the government’s human rights record to politics and an unnamed “nexus globally” that cannot stomach India’s ascension.

“Our rise at the international level is because India, under Prime Minister Narendra Modi, is looking out for Indian interests, taking independent decisions,” Mr. Agarwal said. “We are leveraging the strengths of India — whether it is the large youth population, resources, manufacturing strength, I.T. strength, human resource strength.”

Mr. Agarwal said the government’s approach to law and order should not be “classified as human rights violations.” He rejected the contention that Mr. Modi was deploying investigating agencies against his opponents, saying the raids were intended to clean up corruption.

“If somebody has objection to the investigation agency, there is courts, etc., which takes care of balance of power,” he said.

But local courts, analysts and activists say, often act as a stamp for the executive’s abuses. The already-clogged higher courts struggle to keep up and are at times accused of aiding the executive by ignoring important cases of constitutional overreach. There are nearly six million cases pending in India’s high courts and more than 70,000 in the Supreme Court.

One tactic the governing party deploys is to jail critics under strict laws against terrorist activities and money laundering. The conviction rate is abysmal, but the process of exoneration serves the political purpose of spreading fear, critics say.

Siddique Kappan, a journalist, and his taxi driver were arrested in October 2020 as he tried to report on the government’s efforts to contain the blowback over a gruesome rape case. Before Mr. Kappan had even reached the village, the government charged him with intending to hurt local communal harmony. He was repeatedly denied bail.

When the Supreme Court of India finally heard his appeal this month, the judges took less than 30 minutes to rule that the government’s case for denying Mr. Kappan his freedom was flimsy at best and granted him bail. Both Mr. Kappan and the taxi driver had already spent nearly two years in jail. But even the highest court’s intervention did not free Mr. Kappan: He remains in jail under another pending case against him, while the driver has been freed.

“In our criminal justice system, the process is the punishment,” N.V. Ramana lamented before his retirement as India’s chief justice last month.

Mr. Modi’s confidence at home has extended into confidence abroad.

Officials in his government often denounce international indexes rating countries on key indicators like health or press and religious freedom, dismissing them as products of colonial agendas or foreign naïveté on India’s civilizational approach — an attitude that reminds many diplomats of the stance often taken by authoritarian China.

“Shall we not set our own standards?” Mr. Modi said last month at an event marking his country’s 75 years of independence, as helicopters showered rose petals. “We want freedom from slavery.”

In April, Secretary of State Antony J. Blinken said in a rare public comment on India’s domestic policies that the United States was “monitoring some recent concerning developments in India, including a rise in human rights abuses by some government, police and prison officials.”

His Indian counterpart, S. Jaishankar, fired back. “I would tell you that we also take our views on other people’s human rights situation, including that of the United States,” Mr. Jaishankar said during a visit to the United States. “So, we take up human rights issues when they arise in this country.”

Hari Kumar contributed reporting.