This article in no way attempts to go into extreme and great detail on issues of the past few thousand years in the region known as Pakistan. Lets just say the place has had problems since before Alexander the Great.
I will be using Wikipedia as a source for overview and other sources as cited.
The more or less modern history of the place called Pakistan, a coalition of different ethnic groups, tribes and various affiliated parties, begins with the British Empire ending its rule and giving autonomy to India and Pakistan during the Partition of India on 14-15 AUG 1947. By OCT 1947 a little province called Kashmir would touch off the first war between Pakistan and India which would end with a cease-fire on 31 DEC 1948. Yes, not a Peace Treaty, but a cease-fire making it an active war on hiatus, just like the Korean War.
This would also lead to conflicts with Afghanistan over the Pashtun region (Pashtunistan), which would cause Afghanistan to not recognize the boundaries of Pakistan and lead to the formation of the North West Frontier Provinces. Those ethnic tensions go at least as far back as the 19th century and, most likely, farther back than that. Troubles would flare during the late 1940's and 1950's, the USSR wouldn't know what to do before or *after* invading Afghanistan, save to support some form of Pashtun Secession, but that went by the wayside after the invasion. A 100 year agreement for recognition of borders dating back to the British Empire has *lapsed*... yes, it EXPIRED after 100 years, and Afghanistan never recoginzed it as demarckation of borders even when it was in-place. These are some of the currently 'ungovernable' Provinces home to the Taliban and welcomers of al Qaeda.
In 1953 some of the first riots by Ahmadiyya Moslems and cause the first instance of martial law to be declared in Pakistan. Ayub Khan would come to power during this time and, in 1960, seek to have a Constitution put in place for Pakistan. In 1965 Operation Gibraltar would lead to the first attempt to subvert Kashmir by Pakistan, and serve as a founding point for the Pakistani Intelligence Services (ISI) to establish its network in the region. This would see the appearance of mujahideens in Jammu and Kashmir, and attempt to take Kashmir, in full, by subversion. India, coming off of a bitter war with China in 1962 was able to successfully fight this during the Indo-Pakistani War of 1965.
This, like the previous conflict, would end in a 'cease-fire', not a Peace Treaty. By 1969 Ayub Khan would hand power over to Yahya Khan as things started to deteriorate inside Pakistan. East Pakistan would feel disenfranchised as part of the election process that Yahya Khan set up and things would go from bad to worse, even as Khan tried to straighten out internal affairs. The 1965 War would be a debacle on both sides with multiple intelligence failures the first use of non-National forms of illegal military influence in the region. That can of worms remains unclosed.
As part of the Partition, the divided province of Bengal would become East Pakistan and then, with much grief and heartache to all concerned as the Jinnah government attempted to short-change Bengalis and remove their language from Pakistan and then be forced to recognize it. Further Yahya Khan would not be able to handle the internal problems post-1965, the People's Party of Pakistan under Zulfikar Ali Bhutto would gain NO seats in East Pakistan, the Cyclone of 1971 would devistate that region and India would interfere in affairs there, causing an independence movement that would then form East Pakistan into Bangladesh after a War of Liberation in 1971.
Apparently the folks in West Pakistan had this idea that the folks in East Pakistan weren't all that bright and could be easily exploited due to the oppressive poverty there. This would become the starting point of the Indo-Pakistani war of 1971 as India attempted to use international influence to isolate East Pakistan and prevent China from influencing events, while arming East Pakistani military leaders who had taken refuge in India. India built up a rather sizeable force along the border and Pakistan tried the Israeli 6-day war concept of a surprise attack. And Pakistan would lose not only East Pakistan but also parts of West Pakistan in the ensuing war which ended for East Pakistan in a surrender, to become Bangladesh, and in a 'cease-fire' in the West.
This would also represent the first Super Power influence of the Cold War, with China initially working with Pakistan as an Ally, India aligning with the USSR with a friendship treaty in 1971 and the US aligning with Pakistan as part of Henry Kissinger's idea of rapprochement with China.
The US would support a failing military dictatorship to help cement ties with China while the democratic Nation of India would seek support from the Communist and totalitarian USSR. This seemed like a 'good idea' to Henry Kissinger at the time and many *still* think that to open commercial ties with China it was *worth doing*. The USS Enterprise and its attendant ships would enter the Bay of Bengal to show support and provide arms to the Pakistani army (which President Nixon had promised to do), which India saw as a nuclear threat, and would be followed by nuclear armed Soviet ships, casting an unpleasant pall over an already bad situation.
There is a silver lining to all of this: the Simla Agreement of 1972.
Yes, a PEACE TREATY! That only took 25 years to get to...
This would be signed by Zulfikar Ali Bhutto who would come to power and throw Yahya Khan in jail, thus ending one of the nastiest chapters in both their Nation's histories... if only it would end there.
As part of the Cold War involvement, India would see the opportunity to 'go nuclear' and would detonate a 'peaceful' nuclear device in 1974 (FAS site for timeline). Bhutto would start the first nuclear program in Pakistan to counter this change. Bhutto would help to bring in a second constitution and help the Balochs in Iran during the repression of the Shah. During his time as Prime Minister, Bhutto would succumb to the increasing sway of Moslem extremists and declare the Ahmadiyya followers to be non-Moslems as they did NOT believe in the finality of Mohammed. That would not stop the overthrow of the government in 1977, however, when Bhutto was accused of rigging the election and Zia ul Haq would come to power in a coup.
This is where the Soviet Invasion of Afghanistan leads to the arming of Pashtun (remember them? the folks more or less wanting their own place, that Afghanistan was willing to outwait a 100 year declaration on? kind of militant?). President Zia would not only head into radicalization of Islam for Pakistan, help arm the Pashtuns against the Soviets but also put down the Balochs, that have a good sized province in the west of Pakistan, with ethnic kin across the border in Iran and who have some feeling they were swindled out of autonomy way back in 1947. By 1978 President Zia had put in strict Islamic law, removing the socialist based economy in doing so, and put a hand-picked government in place under him. That government would try to weasel its way out of Zia's control and Zia would be killed by a plane crash which indicated sabotage, but no takers on who did it.
After Zia's demise would come a brief respite with democracy returning and see Benazir Bhutto and Nawaz Sharif (of the Muslim party) exchange terms in office, each leaving with corruption charges, so two non-consecutive terms for each. The Kargil Conflict threatened to become the third war over Kashmir. That would not happen due to Pakistan not having the resources to exploit gains, India not having the resources to exploit their successful counter attack and to the damned high, cold atmosphere that neither side was prepared to fight in. This would end in bilateral talks to resolve the issue... say, was it? Or is this just another loose end?
In any event, after two Prime Ministers each exchanging office and getting charged with corruption, we now enter the proximal modern era of Pervez Musharraf after Nawaz attempted to replace him, as head of the army, with the head of the ISI Khwaja Ziauddin. Yes, the ISI, which has been running terror and insurgency operations in Kashmir for decades, helped support the Pashtun against the Soviets, backed the Taliban... PM Nawaz wanted the army to be led by the leader of the ISI. While the west hates military dictatorships, the concept of putting the man in charge of funding and supplying radical islamic terror groups as the head of a national army should give some pause.
So, to sum up:
1) Radical Islam has been plaguing Pakistan since at least the 1950's and definitely since the 1970's and Zia ul Haq. And while President Carter helped to arm the Pashtuns, that was seen as an anti-Soviet move that was continued on by the next Administration. It must also be noted that Saudi Arabia would send cash via various individuals, including Osama bin Laden, to fund extensions of the Muslim Brotherhood and other, local, islamic terror groups, like the various ones that cropped up around Kashmir. Those were indigenous organizations originally sponsored by the ISI and Pakistani State Dept, and *not* the product of western influence.
2) The movement to nuclear arms is a result of the Indian-Soviet agreements and some attempt to stand up to the US after sending a nuclear aircraft carrier group to the Bay of Bengal. In currying favor with China and propping up Pakistan, India and the USSR would be close bedfellows for awhile, but the antagonism against China pre-dates US involvement as does China going nuclear. Those worries pre-date the US sending the aircraft carrier group to the region and is more predicated on the proximal cause of China than the far more distant cause of the US. The Nixon Administration, in currying favor with China did put India in an untenable situation by making a bad situation worse, but not by causing the bad situation in the first place.
3) Exporting of insurgent/terrorist groups may have been started by Pakistan, but India had its share with East Pakistan/Bangladesh, which would backfire as external, radical muslim groups would come to seek haven in the destitute Nation of Bangladesh.
4) The PPP, while being no saints and having given in to early Muslim pressure, were far better than the military dictatorship that followed in the 1970's and, while possibly as corrupt as Nawaz Sharif's party, the PPP did *not* try to expand radical islamic views by placing the head of the terror supporting ISI in charge of the army. In a region of the world rife with corruption, that can be seen in excess, but in no way would it be an all-out capitulation to radicalism. Pervez Musharraf is no winner, and that's the truth, and even at holding the line he is coming up short: but then no one has solved the problem of the Pashtuns and radical islam in Pakistan for decades, either. That said the PPP doesn't have its hands clean, either, in this business and did, indeed, help to expand radical islamic supporters under Zulfiqar Ali Bhutto.
5) Pressure by the US to try and get 'reforms' or some sort of 'unified' party structure was pre-doomed to failure as the PPP and Nawaz Sharif's Muslim party have extremely different views on secular government: the former is for it the latter is not. That attempt to put the head of the ISI in charge of the army and bring the entire military and intelligence establishment under unified, extremist muslim control for the export of terrorism and enforcement of it at home should point out the problem. Musharraf is grimly holding on as his Nation disintegrates and Benazir Bhutto would not have been a great 'unifier' in a Nation collapsing into tribal directed and ISI backed terror warfare. Without firm and hard agreements across the political spectrum to not only disavow expanding terrorism, but to root out the cause of it in the ISI, there will be no internal peace in Pakistan. Benazir Bhutto returned to try and help shift the orientation of Pakistan away from the chaos, and for that she was killed by those wishing even more of the same.
Because the ISI has so many contacts and so much influence, its corruption of the system of government and its support for terrorism make it a prime mover in the current problems in Pakistan. There is damn little the US can do about *that* as it was built from the ground up by Pakistanis, and while some US cash in the era of the Afghan civil war did expand it, far more in the way of cash came in from Saudi Arabia, Muslim Brotherhood, Turabi from Sudan and other areas having extremist muslim organizations willing to raise funds to send to Pakistan. The major fault of the US was in *not* doing a damned thing to support the immediate winners in Afghanistan, who were *not* the Taliban, which might have changed the course of events there. There are not hard and fast guarntees of such things, but by just trying to thwart the USSR a much deeper mess was given to the world for the long run.
Expansion of the plans for nuclear devices via the AQ Khan network falls completely at the feet of those that started nuclear research in Pakistan, namely the PPP, then its continuation through Zia, Bhutto and Sharif. That was, finally, uncovered and the amount of corruption to run that extends to Japan, Indonesia, Abu Dhabi, Bangladesh, Iran, Libya and Syria. It is very telling that the CIA did not pick up any wind of *that* for YEARS. That genie is not only out of the bottle, but the engineering diagrams have most likely gotten into the hands of every dictator thinking that they can get their hands on just enough uranium to make one. As Musharraf cannot incite the moslem population any more by trying to put Khan on trial or allow him to be extradited, his hands are tied at being able to help there much more than he already has... which was enough to get Libya to come clean.
Outside of the absolute and immediate ISI funding for terrorism, are those operatives who have their own, independent funding sources, which I looked at in a previous article. From that we get another name that influenced events in Afghanistan:
First, that reporting from Pakistan showed friction among al Qaeda, the Taliban and the Islamic Party of Gulbudden Hekmatyar. Second, that funding to these groups was drying up due to the loss of state sponsors. While these groups (representative of, but not the entirety of global jihad) continue to receive private donations and surely some rogue regime funding, the loss of Saddam, Libyan, Pakistani and the U.A.E. support could only increase their woes.That from Afghanistan Online, and the name here is that of Hekmatyar. Mr. Hekmatyar has his *own* base of funding as seen from history commons:
Afghan opium production rises from 250 tons in 1982 to 2,000 tons in 1991, coinciding with CIA support and funding of the mujaheddin. Alfred McCoy, a professor of Southeast Asian history at the University of Wisconsin, says US and Pakistani intelligence officials sanctioned the rebels’ drug trafficking because of their fierce opposition to the Soviets: “If their local allies were involved in narcotics trafficking, it didn’t trouble [the] CIA. They were willing to keep working with people who were heavily involved in narcotics.” For instance, Gulbuddin Hekmatyar, a rebel leader who received about half of all the CIA’s covert weapons, was known to be a major heroin trafficker. Charles Cogan, who directs the CIA’s operation in Afghanistan, later claims he was unaware of the drug trade: “We found out about it later on.” [Atlantic Monthly, 5/1996; Star-Tribune (Minneapolis), 9/30/2001]Not only heroin, but gold, semi-precious stones, gun running... a veritable clearinghouse for orgnized criminal activity to support terrorism. What is interesting is that even Saudi arms dealer Adnan Keshoggi supported Hekmatyar's group (source: Chicago Tribune, How Saudi wealth fueled holy war, 22 FEB 2004). The main source of his funding was the ISI under Zulfiqar Ali Bhutto, which gave him a good 'start-up' which he would then expand upon, as seen in this Jamestown Foundation article of 21 SEP 2006:
Apparently, a failed uprising by jihadi leader Ahmad Shah Masoud of the Jamiat-e-Islami party in the Panjshir Valley against Daoud's regime in 1975 contributed to a split between Hekmatyar and Rabbani. It was, however, more Hekmatyar's desire for control that led to the disagreement between the two leaders. Waheed Mujda, who was a former member of Hezb-e-Islami, told The Jamestown Foundation that the main cause of Hekmatyar's clash with Rabbani was his idea of defeating the pro-Russian regime militarily, while Rabbani wanted to reach this goal politically. Strongly backed by the Pakistani government of Prime Minister Zulfiqar Ali Bhutto, Hekmatyar established Hezb-e-Islami Afghanistan in 1976. Later in 1979, another clash between Hekmatyar and jihadi leader Mawlawi Khalis evenly divided Hezb-e-Islami into two factions. Khalis established another faction called Hezb-e-Islami's Khalis faction.Hekmatyar would, from that, work his way into multiple funding areas. His work in narcotics and such would make him a valuable resource for other groups looking to make some money and worthwhile contacts in the area. And that has links to other organized crime as seen by World Threats in 2003 by Ryan Mauro:
Hekmatyar received most of the funding provided by Saudi Arabia, the United States and Pakistan to support the Afghan jihad against the Soviets; this made him the most well know and also the most controversial of the Pakistan-based mujahideen leaders. It was Hekmatyar who received anti-aircraft Stinger missiles from the U.S. government through Pakistan's Inter-Services Intelligence (ISI). "Hekmatyar's commanders in eastern Afghanistan were those who fired the first Stinger anti-aircraft missiles at Soviet warplanes," explained Mujda . Indeed, it was Hezb-e-Islami Commander Abdul Ghaffar who hit the first Soviet helicopter gunship with an anti-aircraft Stinger missile in eastern Nangarhar province in September 1986 .
"Hekmatyar was indeed the key character in collecting money from anti-Soviet factions and countries to make the war continue, but since he was so selfish and hungry for power most of the jihadi leaders did not like him, though they needed him," said Mujda. Mujda quoted Mawlawi Khalis as saying "I pray to god to let Hekmatyar live among us in Pakistan, but I don't want him with us in Afghanistan because he would not let anyone, other than himself, become the country's leader." Hekmatyar was known as an anti-American figure among the Afghan jihadi leaders; ironically, the United States, through the ISI, was his biggest financial and military supporter. Hekmatyar most clearly expressed his anti-American credentials when he refused to shake hands with President Ronald Reagan in 1985 under the roof of the White House. Hekmatyar came under great pressure from Pakistani leaders to meet with Reagan, but his argument was that being seen shaking hands with the U.S. president would strengthen the Soviet claim that the war was not a jihad and was instead a U.S.-led campaign to win the Cold War.
More significantly, shortly after 911, Spanish investigators launched an intense search for Semyon Mogilevich do to his well-known business and close relations with the Taliban and Al-Qaeda. The terrorists' search for weapons of mass destruction could quickly and secretly become successful through their already established business relationship with Mogilevich. In the past, he has attempted to smuggle uranium into France from Russia, and there has been testimony that the has access to nuclear materials and nuclear components.  Even worse, Russian security services have confirmed that Mogilevich sold radioactive materials to Bin Laden prior to September 11, 2001.  Additionally, the Italian anti-organized crime office has learned, according to a French expert, that Mogilevich sold the parts for a radiological "dirty bomb", and seven American-made enriched uranium fuel rods through his crime syndicates. These are the very same businesses that Hekmatyar is associated with in Pakistan and Afghanistan to run his terror operations in those countries plus in Kashmir. The 'Red Don', Semion Mogilevich (as I looked at previously) is one of the most far-ranging of the Red Mafia having been involved in everything from stock market manipulation and bank fraud in Canada and the US to being a supplier of Osama bin Laden.
The Washington Times has reported in the times closely following September the 11th, 2001, that the Russian Mafia had sold components for chemical and biological, and even nuclear, weapons to Bin Laden and the Taliban. There is also extensive drug trafficking cooperation between the partners. An American official was quoted at this time as speaking of a secret nuclear weapons laboratory in Afghanistan and that the State Department had concluded that Al-Qaeda was probably trying to develop anthrax and sarin gas.  In August 2002, the Stanford International Studies Institute released a research report documenting approximately 700 cases of attempted or successful smuggling of radioactive materials worldwide. No doubt, the majority of these incidents had the involvement of the Russian Mafia.
Apparently, the power of the Russian Mafia and their associates (linked to Afghan drug trafficking) boasts nearly unlimited resources and innumerable contacts. US defense sources have said that Al-Qaeda does have the potential to obtain nuclear weapons and weapons-grade uranium in Russia via the organized crime networks. An unidentified senior defense official has confirm that Al-Qaeda made several inquiries about weapons of mass destruction on the black market. Several recent intelligence report have described their efforts to buy nuclear devices and materials in central Asia and Russia. Since 1992, at least a dozen thefts of weapons-grade uranium and plutonium have been reported in Russia alone.  The with this is that when a theft is successful in the former Soviet Union, you probably will not even know it. Unfortunately, but hopefully coincidentally, the sharpest rise in incidents involving attempted or successful nuclear weapons-related smuggling occurred from the summer of 1996 to the end of 1998. 
Soon after the fall of the Taliban regime, Hekmatyar would seek to reconcile himself with an unlikely Nation: China. This seen from 07 SEP 2002 Asia Times article:
Sources within the HIA say that the organization has recently reestablished contact with the Chinese government. In the past, Beijing has blamed the HIA for stirring a religious uprising in in the northwestern Muslim region of Xinjiang, but Hekmatyar made concerted efforts to placate China, as well as to urge the Muslim leaders in Xinjiang to stop their separatist agitation. Beijing was said to be appreciative of these efforts, but it is yet to be seen how far China will go in supporting the new Afghan freedom struggle against foreign troops, if at all.While not having much sense for religious extremism, it does have great sense for ensuring that supply points in China are available for use and trying to kiss up after sending his organization into western China in the 1990's (Source: NYT, 13 MAR 1994). Semion Mogilevich runs an airline system that includes China as amongst its destinations for its part in heroin production.
As of this year Mr. Hekmatyar's group, Hizb-i-Islami declared a unilateral ceasefire (source Terror Knowledge Base) after suffering losses due to defections from his 'party'. Reports of his capture have proven premature, however as evidence by the declaration of a ceasefire. On 03 DEC 2007, he would issue the following statement, as seen from UPI:
KABUL, Afghanistan, Dec. 3 (UPI) -- Hard-line Islamist and warlord Gulbuddin Hekmatyar reportedly wants a phased withdrawal of foreign forces and a neutral interim government in Afghanistan.Thus he appears to be turning on the hand that feeds him, unless he is taking money from the ISI to attack inside Pakistan. He is quite capable of making *that* distinction. Still, as an ethnic Pashtun with connection, Hekmatyar is just a much a problem for Pakistan as Afghanistan if not moreso, having the NWFP nominally inside Pakistan (although with a 100 year agreement expiring something really should be done about finalizing that).
Pakistan's Dawn newspaper reported the leader of the anti-government Hizb-i-Islami group -- which has claimed responsibility for some recent suicide bomb attacks -- says a neutral caretaker government is needed to hold elections in Afghanistan.
In a statement issued during the weekend by a close associate in neighboring Pakistan's Peshawar, Hekmatyar welcomed the Japanese government's decision to withdraw its forces from Afghanistan and urged NATO members to do the same, the report said.
He called for moving foreign forces to garrisons initially, and then for withdrawing them from the country.
The Dawn report said Hekmatyar, who had once been Afghanistan's prime minister, is wanted by the U.S. government.
In his statement, he said his faction is ready for cooperation with other parties to restore peace to the country.
Hekmatyar helped end the Soviet occupation of Afghanistan in the 1980s, but since Sept. 11, 2001, has turned against both Pakistan and the United States.
So, when you hear political candidates spout off about 'invading Pakistan' or 'sending in wingtips', realize that the former did the British no good and the latter we have done for decades, and we already see the results of that. Just like with Iraq it is time to put 'realism' to pasture and start recognizing the inherent complexities of Nations below the National government level. Because if you think Iraq is 'complex' with all of its tribes and ethnic differences, you haven't even begun to think in terms of Pakistan.
Remember, Pakistan is nuclear armed.
Make your political decisions very, very carefully for they *will* come back to haunt you.