In the rush to blame Pakistan for the terrorist atrocity in Mumbai, a dangerous mistake is being made. The impulse to implicate Pakistan is of course understandable: the past is replete with examples of Pakistani and Indian intelligence agencies working to destabilise the historical enemy across the border.
But it is too soon to know who is behind the current attacks. Some or all of the attackers may indeed come from or have supporters in Pakistan. Equally, some or all may be Indian. The desire of some in India to ascribe guilt to Pakistan before the evidence is in is, therefore, an attempt to avoid introspection.
India and Pakistan are more alike than politicians of either country tend to acknowledge. The triumphal narrative of India as an incredible success, and the defeatist narrative of Pakistan as an impending disaster are both only half true. For much of this young century, Pakistan has enjoyed economic growth rates not far behind those of India, and this year Pakistan has emulated its neighbour by returning to democracy.
India, meanwhile, is, like Pakistan, home to many simmering insurgencies. Had recent protests in Indian Kashmir occurred in a former Soviet Republic, they would have been hailed by the world as a new Orange Revolution (and had they occurred in Tibet, they would have resulted in calls for international pressure on Beijing). Similarly, the tensions in India's northeast, the armed Naxalite movement, and the slaughter of Muslims in Gujarat all run counter to the half-truth of "India shining".
Both Pakistan and India are plagued by extremist violence. Both have in their six decades of independence dramatically failed their poor. Earlier this year, the World Bank reported that half of Indian children are so malnourished their bodies fail to achieve normal size. That is twice the rate of child malnourishment found in sub-Saharan Africa.
The reason to look at the similarities between India and Pakistan is not to drag India down or to deny the wonderful accomplishments of which Indians should be proud. Rather, it is to point out that the countries are in this together. Their fights against extremism cannot be separated by national borders into convenient compartments, one marked "domestic" and the other "foreign". Just as Pakistan and Afghanistan must cooperate if they are to solve the problems of violent extremism, so must Pakistan and India.
There has never been a better time for such cooperation. The people who can best understand what the residents of Mumbai are going through are the residents of Islamabad. The destruction of the Islamabad Marriott only weeks ago foreshadowed the attacks on the Oberoi and the Taj, and the pitched gun-battle between extremists and government forces in South Mumbai has eerie echoes of last year's bloody and prolonged standoff at Islamabad's Red Mosque.
Just as Delhi has seen bombings this year, so has Lahore. Just as rogue elements of Pakistan's armed forces have been accused of supporting terrorists, so has a lieutenant colonel in the Indian army. Of course India and Pakistan are not the same, but the parallels are remarkable. Continuing to ignore this serves only to divide two countries that could benefit greatly from greater unity.
Fortunately, a coming together is possible. Pakistan is emerging from a long period of denial about its terrorism problem. The Pakistan army is engaged in a massive offensive against extremists in the tribal areas, willing to take hundreds of casualties and displace hundreds of thousands of Pakistani citizens in the process. President Zardari is extending olive branches to India in the form of calls for greater cooperation against terrorism, more economic integration, and compromises on Kashmir.
The Indian government has been slow to seize this opportunity. The Mumbai attacks now provide a perfect pretext to reject Pakistan's overtures and set in motion a train of events reminiscent of 2001, when the terrorist attack on India's parliament brought the countries to the brink of war. Such a reaction would only benefit the terrorists. It would do so directly by distracting the Pakistan army from its offensive in the tribal areas, and it would do so indirectly by turning public opinion in Pakistan, which is slowly hardening against extremism, against India instead.
The alternative is to acknowledge that - like rivers, languages, and history - terrorism ties India and Pakistan together. India cannot prosper while Pakistan festers. Pakistan cannot progress while standing in the way of India's ascent. Only by cooperating can both countries hope to achieve security and make dreams of prosperity come true for more than a small minority.
When terrorism strikes, divisive anger is a natural response. Wisdom lies, however, in realising that we of India and Pakistan are united by our shared sorrow.
Mohsin Hamid, the author of The Reluctant Fundamentalist.