It was created as a result of religious division between Hindus and Islamic peoples in former British Colomial India.

From the earliest period of pre-history and recorded history of the region, modern Pakistan formed the heart-land of a larger territory, extending beyond its present eastern and western borders and receiving momentous and mighty impacts from both the directions.

The Indus region, which covers much of Pakistan, was the site of several ancient cultures including the Neolithic era Mehrgarh and the Bronze era Indus Valley Civilization (2500 BCE - 1500 BCE) at Harappa and Mohenjo-Daro.[12]

Waves of conquerors and migrants from the west - including Harappan, Indo-Aryan, Persian, Greek, Saka, Parthian, Kushan, Hephthalite, Afghan, Arab, Turkics, and Mughal - settled in the region through out the centuries, influencing the locals and being absorbed among them. Great ancient empires of the east - such as Nandas, Mauryas, and Guptas - ruled these territories at different times. However, in the medieval period, while the eastern provinces of Punjab and Sindh became aligned with Indo-Islamic civilization, the western areas became culturally allied with the Iranic civilization of Afghanistan and Iran.[13] The region served as crossroads of historic trade routes, including the Silk Road, and as a maritime entreport, for the coastal trade between Mesopotamia and beyond up to Rome in the west and Malabar and beyond up to China in the east.

The Indus Valley Civilization collapsed in the middle of the second millennium BCE and was followed by the Vedic Civilization, which also extended over much of the Indo-Gangetic plains. Successive ancient empires and kingdoms ruled the region: the Achaemenid Persian empire[14] around 543 BCE, Greek empire founded by Alexander the great[15] in 326 BCE and the Mauryan empire there after. The Indo-Greek Kingdom founded by Demetrius of Bactria included Gandhara and Punjab from 184 BCE, and reached its greatest extent under Menander, establishing the Greco-Buddhist period with advances in trade and culture. The city of Taxila (Takshashila) became a major centre of learning in ancient times - the remains of the city, located to the west of Islamabad, are one of the country's major archaeological sites. The Rai Dynasty (c.489-632) of Sindh, at its zenith, ruled this region and the surrounding territories.

In 712 CE, the Arab general Muhammad bin Qasim[16] conquered Sindh and Multan in southern Punjab. The Pakistan government's official chronology states that "its foundation was laid" as a result of this conquest.[17] This Arab and Islamic victory would set the stage for several successive Muslim empires in South Asia, including the Ghaznavid Empire, the Ghorid Kingdom, the Delhi Sultanate and the Mughal Empire. During this period, Sufi missionaries played a pivotal role in converting a majority of the regional Buddhist and Hindu population to Islam. The gradual decline of the Mughal Empire in the early eighteenth century provided opportunities for the Afghans, Balochis and Sikhs to exercise control over large areas until the British East India Company[18] gained ascendancy over South Asia.

The War of Independence 1857, also known as the Sepoy Mutiny, was the region's last major armed struggle against the foreign British Raj and it laid the foundations for the generally unarmed freedom struggle, led by the Hindu dominated Indian National Congress, in the twentieth century. The All India Muslim League rose to popularity in the late 1930s amid fears of under-representation and neglect of Muslims in politics. On 29 December 1930, Allama Iqbal's presidential address called for an autonomous "state in northwestern India for Indian Muslims, within the body politic of India."[19] Muhammad Ali Jinnah espoused the Two Nation Theory and led the Muslim League to adopt the Lahore Resolution of 1940 (popularly known as the Pakistan Resolution), which ultimately led to the formation of an independent Pakistan. The Indian independence movement, led by Mahatma Gandhi, demanded freedom from British rule. In early 1947, Britain, coming under strong pressure from other Western nations to end its violent suppression of the freedom movement, decided to end its rule of India.

In June 1947, the nationalist leaders of British India - including Nehru and Abul Kalam Azad on behalf of the Congress, Jinnah representing the Muslim League, B. R. Ambedkar representing the Untouchable community, and Master Tara Singh representing the Sikhs - agreed to the proposed terms of transfer of power and independence. The modern state of Pakistan was established on 14 August 1947 (27 Ramadan 1366 in the Islamic Calendar), carved out of the two Muslim-majority wings in the eastern and northwestern regions of British India and comprising the provinces of Balochistan, East Bengal, the North-West Frontier Province, West Punjab and Sindh. The controversial division of the provinces of Punjab and Bengal set the stage for communal riots across India and Pakistan - millions of Muslims moved to Pakistan and millions of Hindus and Sikhs moved to India. Disputes arose over several princely states including Muslim-majority Kashmir and Jammu, whose ruler had acceded to India following an invasion by Pashtun warriors, leading to the First Kashmir War in 1948.

From 1947 to 1956, Pakistan was a Dominion in the Commonwealth of Nations. It became a Republic in 1956, but the civilian rule was stalled by a coup d'Ã©tat by General Ayub Khan, who was president during 1958-69, a period of internal instability and a second war with India in 1965. His successor, Yahya Khan (1969-71) had to deal with a devastating cyclone - which caused 500,000 deaths in East Pakistan - and also face a civil war in 1971.

Economic grievances and political dissent in East Pakistan led to violent political tension and military repression that escalated into a civil war,[20] which invited covert and later overt Indian intervention that escalated into the Indo-Pakistani War of 1971, and ultimately to the secession of East Pakistan as the independent state of Bangladesh.[21] Estimates of the number of people killed during this episode vary greatly, from ~30,000 to over 2 million, depending on the source.

Civilian rule resumed in Pakistan from 1972 to 1977, under Zulfikar Ali Bhutto, until he was deposed and later sentenced to death, (in what his followers claimed was a judicial murder), in 1979 by General Zia-ul-Haq, who became the country's third military president. Pakistan's secular policies were replaced by Zia's introduction of the Islamic Shariah legal code, which increased religious influences on the civil service and the military. With the death of President Zia in a plane crash in 1988, Benazir Bhutto, daughter of Zulfikar Ali Bhutto, was elected as the first female Prime Minister of Pakistan. Over the next decade, she alternated power with Nawaz Sharif, as the country's political and economic situation worsened. Pakistan got involved in the 1991 Gulf War and sent 5,000 troops as part of a US led coalition, specifically for the defence of Saudi Arabia.[22] Military tensions in the Kargil conflict[23] with India were followed by a Pakistani military coup d'Ã©tat in 1999[24] in which General Pervez Musharraf assumed executive powers. In 2001, Musharraf became President after the controversial resignation of Rafiq Tarar. After the 2002 parliamentary elections, Musharraf transferred executive powers to newly elected Prime Minister Zafarullah Khan Jamali, who was succeeded in the 2004 Prime-Ministerial election by Shaukat Aziz and was followed, for a temporary period in office, by Chaudhry Shujaat Hussain. On 15 November 2007 the National Assembly completed its tenure and so, pending elections, a caretaker government was appointed with the former Chairman of the Senate, Muhammad Mian Soomro as caretaker Prime Minister. However, the December 2007 assassination of Benazir Bhutto during election campaign led to postponement of elections and also underscored the then prevailing instability of Pakistan's political system. After the parliamentary elections held in march, Yousaf Raza Gillani was sworn in as Prime Minister.[25]