Kayhan Ozer / AP

In Turkey, President Recep Tayyip Erdoğan has acted on his yearlong quest to restore the historic Hagia Sophia, once a Byzantine-era cathedral and museum, as a functioning mosque. Three thousand miles away, in India’s northeastern city of Ayodhya, Prime Minister Narendra Modi has fulfilled a similar promise, last week laying the foundation for a new Hindu temple on the ruins of a 16th-century mosque where Hindus believe an ancient temple once stood.

Yet the transformation of these sites marks more than a simple manifestation of religious adherence. At its core, it represents a concerted effort by Turkey’s and India’s leaders to galvanize support from their religious and nationalist bases, even if doing so comes at the expense of their countries’ religious minorities. Even more fundamentally, it is changing how these two countries see themselves, demonstrating a simultaneous recasting of once-secular republics into fully fledged ethnonationalist states.

For the past six years of Modi’s premiership, and the nearly two decades of Erdoğan’s rule, both leaders have undertaken a systematic effort to remake their countries in their own image. For Modi, this has meant replacing the secular vision of India’s first prime minister, Jawaharlal Nehru, with a Hindu-nationalist one—an effort that has culminated in a number of landmark decisions, including last year’s revocation of the constitutional autonomy of Jammu and Kashmir; the imposition of a citizenship registry that risks rendering nearly 2 million people, many of whom are Muslim, stateless; and, most recent, the passage of a new law that bars people from three neighboring countries from seeking a path to citizenship if they are Muslim. For Erdoğan, this has meant replacing the secularizing reforms of modern Turkey’s founder, Mustafa Kemal Ataturk, with his own brand of Islamic authoritarianism—an effort that has involved the repression of minorities, crackdowns on perceived opponents, and the weakening of Turkish institutions.

The similarities between the two leaders go beyond their religious convictions. The two men come from humble beginnings, and have cast themselves as political outsiders whose bids for power would reshape their countries for not only the next decade, but the next century. “Both have personality cults around them,” Sumantra Bose, the author of Secular States, Religious Politics, told me. “Both have a sense of themselves as ‘the men of destiny.’”

That ambition was on full display at the grand openings of both places of worship. Ahead of the conversion of the Hagia Sophia, which until last month stood as a museum and a symbol of Turkey’s modern secular state for more than 80 years, Erdoğan extolled the site’s conversion as an assertion of Turkish sovereignty. At the formal reopening, when Erdoğan led the first Friday prayers, he declared that “the yearning of our people … has been accomplished.”

Modi at the groundbreaking ceremony of the Ayodhya temple, at the site of a demolished 16th-century mosque. (Rajesh Kumar Singh / AP)

Modi framed the groundbreaking of the Ayodhya temple through a similar historical lens. Though the site is believed to have been the birthplace of the Hindu deity Rama, it’s also known for having housed the historic Babri mosque, which a Hindu-nationalist mob tore down in 1992, claiming that it had been built on the site of a temple destroyed by the Muslim Mughal Empire. By rebuilding the temple in its place, as was allowed by India’s Supreme Court in a 2019 landmark ruling, “not only is history being made,” Modi said in a televised ceremony, “but it is being repeated.”

By framing these events as rectifiers of historic injustices and declaring them a fulfillment of the national will, Erdoğan and Modi are reaffirming their own belief systems, and using them to redefine how the nation sees itself. “These sorts of events have a powerful symbolism,” said Bose, who watched the Ayodhya ceremony from his home in Kolkata. “It’s a way of signaling the nature of the state that these two gentlemen preside over.”

Such transitions don’t take place overnight. In the case of Turkey, it has involved decades of chipping away at Ataturk’s legacy. Under Erdoğan, “the identity of the majority of Turkey’s population has effectively supplanted the previous secular definition of national identity,” Bose said. Though the same cannot be said for India, which claims, among other religious minorities, a 200-million-strong Muslim population, Bose added that since winning a second mandate last year, “the Modi government has been trying to fast-track in different ways this ideologically driven transition to make India a Hindu-nationalist republic in all but name.”

These battles over places of worship have other advantages too. For one thing, they are effective in stirring nationalist and religious bases. Indeed, 60 percent of Turks approve of the government’s decision to restore the Hagia Sophia to a mosque, according to one recent poll (though another survey casts doubt on whether the move will impact voters’ decisions come the next election). Support for the temple reconstruction in Ayodhya is similarly high.

They also present moments for both leaders to put themselves at the center of a national spectacle without the fear of being undermined by their political opponents, who have little incentive to go against popular sentiment. Though one Muslim lawmaker spoke out against Modi’s attendance at the ceremony, dubbing it a violation of the country’s secular values, opposition to the event appeared to be largely muted. In Turkey, the loudest criticisms of the conversion have come from outside the country (however, this is also at least partly due to Erdoğan’s muzzling of the press over time).

Perhaps most crucially for the two leaders, however, these events help divert attention, if only briefly, from the crises spurred by the pandemic. In addition to the public-health challenges facing India and Turkey (which rank third and 17th for the highest number of confirmed coronavirus cases, respectively), both countries are suffering steep economic downturns. By focusing on matters of national identity and internal divisions, these spectacles can help both leaders distract from unhelpful political realities.

Those are all short-term, political considerations, though. The longer arc here is what is important: By reclaiming these religious monuments and making them a central part of the national story, both leaders are effectively defining what these once-secular republics are becoming—or, indeed, what they’ve already become.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.