The Kashmir dispute was created by Pakistan, and Pakistan itself is the result of a failed attempt by Middle Eastern culture to conquer and colonize the totally different culture of South Asia.
In 1839, the British Empire sought to expand the borders of its colony of British India, by launching a war of conquest against the neighboring Pashtuns. The Pashtuns, as a fiercely independent tribal warrior people, resisted ferociously, so that the British conquest of them was not very successful. The British were only able to conquer part of the Pashtun territory, and even that remained in constant rebellion against them. Meanwhile, the remaining unconquered portion of Pashtun territory became the nucleus for the formation of Afghanistan. In 1893, the British imposed a ceasefire line on the Afghans called the Durand Line, which separated British-controlled territory from Afghan territory. The local people on the ground however never recognized this line, which merely existed on a map, and not on the ground.
In 1947, when the colony of British India achieved independence and was simultaneously partitioned into Pakistan and India, the Pakistanis wanted the conquered Pashtun territory to go to them, since the Pashtuns were Muslims. Given that the Pashtuns never recognized British authority over them to begin with, the Pakistanis had tenuous relations with the Pashtuns and were consumed by fears of Pashtun secession.
When Pakistan applied to join the UN in 1947, there was only one country which voted against it. No, it wasn't India - it was Pashtun-ruled Afghanistan which voted against Pakistan's admission, on the grounds that Pakistan was in illegal occupation of Pashtun lands stolen by the British. Their vote was cast on September 30, 1947 and is an historical fact.
In 1948, in the nearby state of Kashmir, its Hindu princely ruler and Muslim political leader joined hands in deciding to make Kashmir an independent country rather than joining either Pakistan or India. Pakistan's leadership were immediately terrified of this precedent, fearing that the Pashtuns would soon follow suit and also declare their own ethnically independent state. In order to pre-empt that and prevent it from happening, Pakistan's founder and leader Mohammad Ali Jinnah quickly decided to raise the cry of "Hindu treachery against the Muslims" and despatched hordes of armed Pashtun tribesmen to attack Kashmir. This was his way of distracting the Pashtuns from their own ethnic nationalism by diverting them into war against Kashmir "to save Islam". These are the same Pashtun tribesman whose descendants are today's Taliban. Fleeing the unprovoked invasion of their homeland, Kashmir's Hindu prince and Muslim political leader went to India, pledging to merge with it if India would help repel the invasion. India agreed, and sent its army to repulse the Pashtun invasion. Pakistan then sent its army to clash with Indian forces, and the result was Indo-Pakistani conflict, which has lasted for decades.
Pakistan's fear of Pashtun nationalism and separatism, which it worries can break up Pakistan, is thus the root of the Indo-Pakistani conflict over Kashmir and also the root of Pak conflict with Afghanistan, not any alleged Indian takeover of Kabul. This is all due to the legacy of 1839, which happened long before Pakistan was even created.
When a communist revolution happened in Kabul in the late 70s, Pakistan's fear of potential spillover effects on Pashtun nationalism caused Pakistan to embark on fomenting a guerrilla war against Kabul that led to Soviet invasion of Afghanistan. Aligned with with the USA, Pakistan then proceeded to arm the Pashtuns while indoctrinating them with Islamic fanaticism. The USA was not allowed any ground role, and was told it could only supply arms and funds to Pakistan, which would take care of the rest. Pakistan then simultaneously embarked on destabilization of India by fomenting insurgency there.
After the Soviets withdrew, Pakistan again feared that the well-armed Pashtuns would turn on it and pursue secession. So Pakistan then created the Taliban as a new umbrella movement for the fractious factional guerrilla groups under an ultra-fundamentalist ideology. Bin Laden's AlQaeda then became cosy with Taliban, and the result was 9-11.
When the 9-11 attacks occurred, the cornered Pakistanis then did a 180 and promised to help the US defeat the Taliban and bring the terrorists to justice. Meanwhile they were racking their brains hoping to come up with a way to undermine the War on Terror from within. Now that they have succeeded in doing that, and in bleeding US/NATO forces, they hope to jump horses by kicking the US out and aligning with China.
Because of Pakistan's attempts to illegitimately hang onto Pashtun land, it has brought itself into conflicts with so many countries - first against its neighbors and then against more distant larger powers. This is the reason why Pakistan is an irredentist state and can never be an ally against Islamic extremism, because Pakistan depends on this very Islamism as a national glue to hold itself together, and keep nationalistic ethnic groups like the Pashtuns from breaking Pakistan apart.
At the same time, Pakistanis don't dare own upto the Pashtun national question at any level, nor its effect on their national policies, because any attempt to do so would open up the legitimacy of their claim to Pashtun land.
Sovereignty is a 2-way street, entailing not just rights but obligations. Pakistan only wishes to assert rights it feels are owed to it from sovereignty, but wishes to completely duck the issue of any sovereign obligations to apprehend terrorists on what it claims as its own territory. This is because the fundamental reality is that the Pashtun territory is not really theirs, is not really under their control, and the Pashtuns don't really recognize Pakistani central authority over them.
Pakistan uses Islamic fundamentalism to submerge traditional Pashtun ethnic identity in a desperate attempt to suppress Pashtun ethnic nationalism, and to stave off the disintegration of Pakistan. The Pashtuns are a numerically large enough ethnic group possessing the strength of arms to be able to secede from Pakistan at any moment, should they rally toward that cause.
The answer is to let the separatists have their way and achieve their independent ethnic states, breaking up Pakistan. It's better to allow Pakistan to naturally break up into 3 or 4 benign ethnic states, than for it to keep promoting Islamic fundamentalist extremism in a doomed attempt to hold itself together. Pakistan is a failing state, and it's better to let it fail and fall apart. This will help to end all conflict in the region and the trans-national terrorist problem. An independent ethnic Pashtun state will be dominated by Pashtun ethnic identity instead of fundamentalist Islam, and thus AlQaeda will no longer be able to find sanctuary there. Conventional ethnic identity is far more natural and benign than trans-nationalist Islamism with its inherent collectivist political bent. Supporting the re-emergence of 4 natural ethnic states - Pashtunistan, Balochistan, Sindh and Punjab - would be far better than continuing to support a dangerous and dysfunctional failed state like Pakistan which continues to spew toxic Islamist extremist ideology in a doomed attempt to hold itself together.
Following the failure of the Vietnam War, many Americans later recognized that war was really a war of ethnic reunification by the Vietnamese people. It wasn't a case of one foreign country attempting to conquer another foreign country - indeed, the north and south Vietnamese were not strangers or aliens to one another - they were 2 halves of a common whole. The question was whether they would reunify under communist socialism or under free democracy, but because a blinkered American leadership refused to recognize the Vietnamese grassroots affinity for one another and their desire to reunify, it pretty much ensured that Vietnamese reunification would take place under communist socialism.
Likewise, the Pashtun people live on both sides of an artificial Durand Line (Afghan-Pak "border") which they themselves have never accepted or recognized. It's a question of whether they will politically reunify under close-minded theocratic Islamism or under a more secular and tolerant society. Because today's blinkered American leadership is again blindly defending another artificial line on a map, and refusing to recognize the oneness of the people living on both sides of that artificial line, America is again shutting itself out of the reunification process, guaranteeing that Pashtun reunification will occur under fanatical fundamentalist Islamism as prescribed by Pakistan (much as Hanoi's Soviet backers prescribed reunification under communist socialism.) It's only later on, much after America's defeat, that some Americans will realize too late that they should have seen that the Pashtuns on both sides of the artificial line were actually one people. Pakistan knows it all too well, because they've been living with the guilt and fear of it ever since Pakistan's creation - but that's why they're hell-bent on herding the Pashtuns down the path of Islamist fanaticism, using Islamist glue to keep the Pashtuns as a whole hugged to Pakistan's bosom.
If only Washington policymakers could shed their blinkers and really understand what's going on, then they might have a chance to shape events more effectively, and to their favor. Pakistan is rapidly building up its nuclear arsenal, as it moves to surpass Britain to become the world's 5th-largest nuclear state.The Pakistanis are racing to build up as much hard-power as possible to back up the soft-power they feel Islamist hate-ideology gives them.
The world needs to compel the Pakistanis to let the Pashtuns go, and allow them to have their own independent national existence, along with the Baluchis and Sindhis. Humoring Pakistan and allowing it to continue using Islamist hatred to rally the people towards unity to counter slow disintegration is not the way to achieve stability in the region, or security for the world.