About 200 people died when an Indian train was derailed by a band of Muslim attackers on Sept. 26, 1947. (Associated Press)

Omar Waraich is a journalist who covered Pakistan for Time magazine from 2008 to 2016.

Seventy years ago today, as the Indian subcontinent sloughed off British colonial rule, Pakistan was carved out as a homeland for Muslims. Ever since, it has inevitably been compared with its larger, more powerful neighbor — and, for a time, it seemed to come out on top. For decades, Pakistanis cheered the fact that they enjoyed a (marginally) higher gross domestic product per capita. Western journalists based in Delhi would cross the border to report on the superior infrastructure in Pakistani cities. “There are better roads and airports, and more reliable electricity,” the historian William Dalrymple wrote a decade ago. “Middle-class Pakistani houses are often bigger and better appointed than their equivalents in India.”

No longer. Pakistani cities might still be cleaner and more orderly, but they have endured horrific levels of violence. Over the past decade, the country has been locked in a fierce battle with Islamist militants on its soil. The once vaunted infrastructure has sharply deteriorated. Chronic power shortages have plunged cities and villages into the darkness for up to 20 hours a day. The government has been forced, ironically, to turn to India to try and import electricity.

Scarcely have the two countries seemed more different. While Pakistan became briefly notorious as “the world’s most dangerous country,” India was enjoying the strongest economic growth of any country beside China. The United States dispatched Navy SEALs to Pakistan and technology executives to India. One of the few places where it still seemed possible to speak of a Pakistan-India rivalry was on the cricket pitch, where matches between the two countries can attract as many as a billion viewers.

For many years, observers would explain away this divergence of fortunes in terms of democracy. Save for a brief period, India enjoyed uninterrupted popular rule. Pakistan, by contrast, has been ruled directly by its military for three decades and indirectly for the rest. “In India, [the] state has an army,” as the Indian author and politician Shashi Tharoor recently quipped. “In Pakistan, the army has a state.”

But at a closer glance, these distinctions begin to crumble. Democracy has returned to Pakistan, but it has withered in India. For the past nine years, Pakistan has been led by elected civilian governments. The country’s prime ministers are still vulnerable to early exits — as the recent disqualification of Nawaz Sharif shows — and the military remains a powerful force behind the scenes, but the door to dictatorship is slowly creaking shut. Pakistani democrats used to eye India’s secular and pluralist democracy with envy, hoping to replicate its strengths. Now they look at the Hindu nationalist government of Narendra Modi with dread, fearing India has irretrievably slipped into illiberal and majoritarian rule.

And for all the differences between their countries, life for the subcontinent’s most vulnerable people remains depressingly similar — with hundreds of millions languishing in mass poverty and religious minorities cowering in fear of communal violence. In India, the fruits of the country’s prosperity remain dangled beyond the reach of the majority. More than a fifth of the country’s population still lives below the national poverty line. The figures are even worse in Pakistan, where nearly 30 percent languish in poverty. Eighty-four million children are out of school in India and 25 million in Pakistan. It is little wonder, then, that the 2014 Nobel Peace Prize was split between a Pakistani and an Indian — a less-than-subtle suggestion that the two countries refocus their rivalry from arms spending and nuclear weapons to education and health.

Moreover, the middle classes on both sides of the border, who were supposed to represent a more tolerant future, have succumbed to the seductions of strident religiosity and hypernationalism. On social media, secularists and liberals from both countries are routinely derided as “sickular libtards” and “liberal fascists.” Online commenters use a strikingly similar lexicon of hatred and make parallel demands. For instance, against the backdrop of violence in Kashmir last year, members of the Pakistani middle class demanded a ban on Indian movies, while the Indian masses wanted a boycott of Pakistani actors.

What is even more depressing is the intolerance toward minorities. In April, Mashal Khan, was lynched by a mob of his fellow students at a university in Pakistan’s northwest town of Mardan. The students — who stripped him naked, clubbed him and shot him, before disfiguring his corpse — accused him of committing blasphemy. Meanwhile, across the border, Muslims and Dalits have been hunted by Hindu extremist mobs that seized on claims of cow slaughter to carry out their own vigilante killings.

Such violence is chillingly reminiscent of “Partition,” when people were killed for practicing a different faith. As India and Pakistan celebrate their 70 years of independence, it is time for their citizens to reflect on their circumstances, move away from the unpleasant ways in which they resemble each other and embark on a rivalry that would represent a more promising future for their people.