Some historical events have such utterly catastrophic consequences that no amount of “what if” counterfactuals can yield a more awful result. World War I, for example, resulted in an enormous number of fatalities, largely entrenched the imperialism that initiated it and paved the way for both Nazism and Stalinism. How could a different path have been worse?

The 1947 partition of British India, which led to the creation of India and Pakistan as independent countries, was undertaken with nobler motives. But “Midnight’s Descendants,” John Keay’s solid new history of the subcontinent over the past 67 years, leaves the reader with the same depressing thought: No alternative could possibly have been more calamitous.

Partition laid the groundwork for the very civil war it was supposed to prevent — as many as one million people may have died — and created a lasting enmity between two states that are now nuclear-armed. If you include the 1971 genocide Pakistan perpetrated against its restive eastern wing (which became independent Bangladesh in December of that year) and the wildly unstable nature of Pakistan today, you are confronted with a disaster of astonishing proportions.

Keay’s attempt to calculate and analyze this butcher’s bill begins at the end of World War II, which not only left Britain unable to maintain the jewel in its rusting imperial crown, but also helped install a Labour government intent on some form of Indian independence. Keay, the author of several strong histories of Asia, ably switches back and forth between the British diplomats sent to negotiate an end to colonial rule and the three crucial (and obstinate) Indian leaders: Mohandas Gandhi, Jawaharlal Nehru and Muhammad Ali Jinnah, the head of the Muslim League.