A day after promising to ā€œdefend democracy,ā€ President Biden brought up India and Saudi Arabia on Wednesday during a round of meetings at the United Nations ā€” not to raise concerns about repression by either, but to hail them for helping establish a new economic corridor. ā€œI think itā€™s a big deal,ā€ he said.

Perhaps no two countries reflect the difficult and delicate trade-offs in Mr. Bidenā€™s foreign policy at the moment more than India and Saudi Arabia. He has made it a priority to court both nations as part of his effort to counter Russia and China, even as India has been backsliding in its democracy and Saudi Arabia never had one to begin with.

The news of the week illustrated just how acute that tension really is. Indiaā€™s government was accused of orchestrating the assassination of a political opponent on Canadian soil, leaving Mr. Biden caught between one of Americaā€™s oldest friends and the newer friend he has been cultivating. And word emerged that Mr. Bidenā€™s envoys are negotiating a new defense treaty with Saudi Arabia, putting aside its own history of extraterritorial killing.

While Mr. Biden did not address either subject, the White House responded to Prime Minister Justin Trudeauā€™s accusations against India on Wednesday with studied judiciousness. John F. Kirby, a spokesman for Mr. Bidenā€™s National Security Council, pronounced the administration ā€œdeeply concernedā€ about the allegations and said that ā€œthe facts should take the investigators where they may and that the perpetrators of this attack need to be brought to justice.ā€

But he emphasized American ties with India. ā€œI can just tell you that our relationship with India remains vitally important not only for the South Asian region but of course for the Indo-Pacific,ā€ Mr. Kirby told reporters. Then, shortly after the briefing, the council emailed a statement from another spokesperson, Adrienne Watson, saying: ā€œTargeting dissidents in other countries is absolutely unacceptable and we will keep taking steps to push back on this practice.ā€

The killing in Canada spawned second-guessing about Mr. Bidenā€™s outreach to India at a time when he has increasingly prioritized bolstering partnerships over full-throated advocacy for democracy. He just visited India this month and on the way back stopped in Hanoi to cement a strategic relationship with Vietnam, a one-party Communist-run state, with barely a mention of repression there. His administration just signed a new security and economic agreement with Bahrain, a tightly controlled monarchy.

ā€œThey talk a lot about the importance of democracy,ā€ Sarah Margon, who was Mr. Bidenā€™s original nominee for assistant secretary of state for democracy, human rights and labor, said in an interview on Wednesday. ā€œThere are important initiatives that have developed to support democracy. But when push comes to shove, what weā€™re seeing is that supporting and sustaining democracy does not reach the same level of other geopolitical concerns.ā€

Mr. Biden, who has called the ā€œbattle between democracy and autocracyā€ the defining struggle of this era, has lately been moving away from that framing. While he used some version of that wording 11 times last year, he has only done so four times this year and not in the past two months, according to a search of Factba.se, a service that records presidential statements.

During his annual address to the United Nations General Assembly on Tuesday, Mr. Biden did not use the democracy-versus-autocracy phrase, as he had in his speech at the world forum a year ago. And rather than casting the war in Ukraine as a battle for democracy, he talked about it in terms of sovereignty, territorial integrity and freedom from foreign domination. His main reference to democracy in the speech on Tuesday came in condemning a series of recent coups in Africa. ā€œWe will defend democracy ā€” our best tool to meet the challenges we face around the world,ā€ he said. ā€œAnd weā€™re working to show how democracy can deliver in ways that matter to peopleā€™s lives.ā€

Even some of his own advisers have long considered the black-and-white dichotomy too simplistic and diplomatically confining, particularly at a time when Mr. Biden has focused on building alliances to resist aggression by Moscow and Beijing. In effect, he has concluded that he needs the help of some real or budding autocrats to battle bigger, more dangerous autocrats. If that means making nice with India and Saudi Arabia, among others, so be it.

The furor in Canada over the shooting of Hardeep Singh Nijjar, a Sikh community leader, in British Columbia in June feels like an eerie echo of the Saudi-orchestrated assassination of Jamal Khashoggi, a Saudi dissident and journalist living in the United States, at the kingdomā€™s consulate in Istanbul in 2018. In both cases, a government considered an American friend was accused of carrying out the killing of a critic on the soil of a NATO ally.

Mr. Trudeau blamed ā€œagents of the government of Indiaā€ for the shooting and expelled an Indian diplomat described as the head of New Delhiā€™s intelligence agency in Canada. India has denied Mr. Trudeauā€™s accusation and expelled a Canadian diplomat in response. In the past, the United States has joined allies in retaliating against adversaries plotting to murder opponents sheltered in their countries. President Donald J. Trump expelled 60 Russian diplomats in 2018 after agents from Moscow used a nerve agent to try to kill Sergei V. Skripal, a dissident former Russian intelligence officer, on British soil (although Mr. Trump later expressed anger to aides over being talked into doing so).

Unlike Saudi Arabia or Russia, India has long been a thriving democracy with diverse and robust points of view debated in Parliament and the media. But the space for freedom has shrunk in recent years under Mr. Modi, a Hindu nationalist who was once barred from entering the United States because of the massacre of Muslims in the province where he was then chief minister.

Even as Mr. Biden treated Mr. Modi to a coveted state dinner at the White House in June, the news media in India has come under pressure, opposition figures face legal threats and Hindu supremacists have impunity to attack mosques and harass religious minorities. During the Group of 20 meeting Mr. Modi hosted this month, he plastered New Delhi with so many hundreds of billboards and posters of his own face that it would challenge the cult of personality in any authoritarian state.

The negotiation of a possible mutual defense treaty with Saudi Arabia resembling U.S. military pacts with Japan and South Korea comes amid a broader effort to transform Americaā€™s relationship with the kingdom. Mr. Biden hopes to broker a deal to normalize relations between Israel and Saudi Arabia, and Crown Prince Mohammed bin Salman wants a stronger security commitment from Washington as part of any arrangement.

Prince Mohammed suggested on Wednesday that progress was being made toward normalization. ā€œEvery day we get closer,ā€ he told Fox News. The topic was also a big part of a meeting held by Mr. Biden with Prime Minister Benjamin Netanyahu of Israel, who likewise offered an optimistic forecast for ā€œa historic peace between Israel and Saudi Arabia,ā€ as he termed it. ā€œThis is something within our reach,ā€ the Israeli leader told reporters.

The notion of drawing closer to Riyadh belied Mr. Bidenā€™s 2020 campaign promise to make Saudi Arabia a ā€œpariahā€ because of the murder of Mr. Khashoggi, who was killed and dismembered, according to the C.I.A., on the orders of Prince Mohammed, often called M.B.S. Mr. Biden shared a friendly handshake in a brief conversation with Prince Mohammed on the sideline of the recent Group of 20 meeting in New Delhi, abandoning the more distant fist-bump the president opted for while visiting Jeddah a year earlier.

As with India, Vietnam and other countries Mr. Biden has sought to bolster relations with, the subtext of the move to strengthen ties with Saudi Arabia is China and Russia. The Biden administration wants not only to bring an end to generations of conflict between Israel and its Arab neighbors but also to anchor the oil-producing kingdom more firmly in Americaā€™s orbit.

Absent from the administrationā€™s deliberations are some key voices representing democratic reform. Thirty-two months after taking office, Mr. Biden still has no Senate-confirmed assistant secretary of state overseeing democracy promotion since Ms. Margonā€™s confirmation was blocked by Republicans.

And the president has never named a permanent replacement for Shanthi Kalathil, his White House coordinator for democracy and human rights, who stepped down in early 2022, leaving vacant a position with equal rank to influential advisers on the Middle East and the Indo-Pacific who have been orchestrating the outreach to countries like Saudi Arabia and India.

Tom Malinowski, a Democratic former representative from New Jersey, said there was ā€œadmirable realism and clarityā€ in the democracy-versus-autocracy vision that Mr. Biden has previously articulated, one that seemed undercut by making a permanent security agreement with a country where all power is vested in an unaccountable royal family.

ā€œThe problem with giving a legally binding defense commitment to Saudi Arabia ā€” something weā€™re not even ready to do for Ukraine ā€” is not just that it would erode the moral authority of our position,ā€ he said. ā€œItā€™s that M.B.S. is so aggressively on the side of the other authoritarian powers ā€” helping Russia economically while hurting American consumers, crushing any democratic openings in the Arab world, even trying to corrupt American politics.ā€

Mr. Biden and his advisers insist that he remains committed to democracy and human rights even in countries that he wants to work with. ā€œIā€™ve raised it with every person I met with,ā€ he told reporters while in Hanoi.