Since its re-election last year, Narendra Modi's BJP-led government has sought to accelerate India's transition from a state erected on secular principles to one governed by Hindu nationalism. In August last year, it removed whatever remained of Jammu and Kashmir's autonomy and placed its only Muslim-majority state under lockdown.

Three months later, the government passed the Citizenship Amendment Act (CAA), which legally marginalises Muslims and risks stripping them of Indian citizenship. Last month, Hindu mobs targeted Muslims with death and destruction in Delhi, where the police were credibly accused of aiding the attacks.

As the world has witnessed a downturn in India's democratic and liberal standing, some pessimists worry that its unabashed majoritarian turn spells trouble for the burgeoning alliance with the United States. Having witnessed major advances in military, economic, sociocultural, and diplomatic ties over the last 20 years, surely a partnership between the world's largest and oldest democracies cannot help but be affected by such a shift in values.

To the contrary, there is little compelling evidence for the idea that the Indo-US relationship will suffer. Democracy and liberal values matter little when cementing alliances between states, even to those countries that profess otherwise, such as the US. When one focuses on the forest, not individual trees, it becomes abundantly clear that Washington and New Delhi's upward trajectory will press on.

Alliances rooted in common interests, not democracy

The relationship between India and the US is built on the sturdiest possible foundation in international politics: a common long-term rival. In times of peril, nations with very different priorities and governing philosophies may band together to defeat an enemy, such as the US and the Soviet Union during World War II. Even in times less urgent than a global war for national survival, countries will ignore what they consider unsavoury domestic behaviour from others so long as they align geopolitically.

This truism is slightly complicated in the case of the US. Unlike most countries, the US does, as a matter of course, expend time and resources in championing democracy, human rights, and other liberal hobby horses abroad. At the same time, however, the same US will look past violations of democratic doctrine and human rights if other, more important, foreign policy goals are met. The probably apocryphal story of Franklin Roosevelt referring to Nicaraguan dictator General Somoza as "a son of a b****, but our son of a b****" perfectly encapsulates this dichotomy - or less kindly, hypocrisy.

Certainly, during the Cold War, the US partnered with murderous dictators and thuggish autocrats everywhere from Latin America to Europe to the Middle East to South Asia and Southeast Asia, all in a bid to oppose the spread of communism. This period saw the US overthrow democratically elected governments six times and intervene in at least 12 other elections. Even after the defeat of communism, the US has been happy to engage with awful regimes in the 30 years since.

South Asia itself is no stranger to such US alliances with illiberal leaders and governments. Notably, the periods when the US was most friendly to Pakistan was when it was under military rule: the 1960s, 80s, and 2000s.

China - the common threat

Notwithstanding this record, it is easy to see why some analysts may overrate the importance of democracy when it comes to India. After all, successive American leaders have couched warm ties with it in such language.

However, this flowery rhetoric is better thought of as window-dressing for more base motivations. In fact, Washington's embrace of India is driven by the crystallisation of the view that China is a threatening rival.

Up to the 1990s, it was a reasonably open question whether the US would adopt an accommodationist or aggressive policy towards Beijing's rise. The last 20 years have ended such a debate: China is considered a rival to be contained, not a friend to be nurtured.

The US has consequently sought to orient its foreign policy around this basic supposition. Indeed, Barack Obama's much-ballyhooed "pivot to Asia" was motivated by the strategic imperative that China and the Asia-Pacific region were much greater priorities than the Middle East, the region where the US spent most of its blood and treasure.

It is China, not democracy, liberalism, or constitutionalism that should be credited with the bonhomie marking US-India relations. After all, India and the US were both democracies through the 1950s, 60s, 70s, 80s, but it was only at the turn of the century that their union blossomed. If democracy was the central factor pushing these countries together, it would have happened a long time ago.

Furthermore, if the relationship was a product of common liberal values, it would be scarcely imaginable to think of two worse personalities than Trump and Modi to serve as figureheads for it, suffused as the pairing is by authoritarian and nationalist impulses. Indeed, the very fact that Trump and Modi have steadily driven the alliance forward speaks volumes about the relative significance of democracy.

Muted US government criticism

As such, precisely because democracy or liberalism is not an important contributor to warming ties, the backslide in India's human rights record will not adversely affect the relationship. Why should it bother Washington that India is not behaving in accordance with the secular and democratic principles enshrined at its birth?

Indeed, in the aftermath of its moves in Kashmir, the Modi government would have been heartened to hear the State Department consistently refer to the issue as an "internal matter" for India. There was slightly more concern evinced after the CAA, but even then, US diplomats did not offer anything approaching criticism, only mild suggestions to India to better live up to its own ideals.

Because the US government is a large, unwieldy institution with varying interests and priorities, silence is not a uniform reaction, and one may hear the odd, isolated criticism of Modi and the BJP. Even some presidential candidates in the Democratic Party, including most vociferous Bernie Sanders, unambiguously and unequivocally spoke out against the Indian government.

But in the grand scheme of things, Congress and federal bureaucracies such as the State Department and, especially, the Pentagon, are unlikely to ascribe overriding significance to issues such as the constitutional status of Kashmir or the rights and security of India's minorities. From their perspective, there are bigger fish - China, specifically - to fry.

Indo-US ties: a firm footing

Could a relationship on such a firm footing be upended? Logically, there are two possibilities: international and domestic. If, for instance, the US softens its stance towards China, it would imply less urgency in embracing India. This, however, is an unlikely prospect in the short run; China is considered a problem across the political spectrum in the US. Talking up strategic cooperation with Beijing is a loser's game for Washington.

Domestically, it could be posited that Indian-Americans, mirroring the Cuban-American model, may push Washington to adopt a sterner position against Hindu nationalism in India. Just as conservative Cuban-Americans lobby for hawkish positions against Castro's socialist regime in their "home" country, is it reasonable to expect the largely liberal Indian-American minority to politic for more strident admonishment of right-wing nationalism in theirs?

Certainly, this argument would find support in the recent conduct of young Indian-Americans, particularly college students, who have protested against developments in India. More pertinently, Congresswoman Pramila Jayapal led a resolution in the House condemning the BJP government's recent actions.

But it is striking that Jayapal's resolution, despite being a bipartisan one with more than 60 co-sponsors, has essentially come to nothing, dying in committee. Tellingly, it faced political headwinds from more conservative and nationalist Indian-American lobbying groups, leaving it unlikely to be passed by the House even as a nonbinding resolution, let alone one with more teeth.

More generally, if last autumn's Howdy Modi rally in Houston and other admittedly anecdotal evidence is anything to go by, Indian-Americans are not uncomfortable with Modi's brand of majoritarian nationalism - as long as it is practised in India, not the US. In this telling, Indian-Americans may resemble the Jewish-American model more than the Cuban-American one: a highly educated, socioeconomically successful ethnic minority which votes for Democrats in a roughly 3:1 ratio, while at the same time extending a reasonably long leash to illiberal behaviour in the country of their ethnic brethren.

Indo-US ties were stronger in 2000 than 1990, stronger in 2010 than 2000, and stronger in 2020 than in 2010. It would be a brave individual to bet against the continuation of this trend.

It is not that progress between the two parties is unimpeded or that they do not occasionally disappoint the other. Indeed, the alliance would benefit from a dose of realism and tempered expectations about what it can deliver, particularly in the arena of defence and military cooperation. But the relationship is assuredly strong enough to buy New Delhi insurance against American criticism as it descends to a religious-nationalist state.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.