The history of Pakistan encompasses the history of the regions constituting modern day Pakistan. Prior to independence in 1947, the current areas of Pakistan were ruled in various periods by local kings and numerous imperial powers, the last being the British Empire. The ancient history of the region consisting of present-day Pakistan also includes some of the oldest empires of the Indian Subcontinent; and some of the world's major civilizations such as the Indus Valley civilization.
Pakistan's political history is closely connected with the struggle of South Asian Muslims to regain power after they lost it to British colonialism. In 1906 the Muslim League was established in opposition to the Congress party which it accused of failing to protect "Muslim interests, aims neglect and under-representation." On 29 December 1930, philosopher Sir Muhammad Iqbal called for an autonomous new state in "northwestern India for Indian Muslims". The League rose in popularity through the late 1930s. Muhammad Ali Jinnah espoused the Two Nation Theory and led the League to adopt the Lahore Resolution of 1940, demanding the formation of independent Muslim states in the North-West and North-East of British India. In 1946 the Muslim League contested elections over the question of partition. The 1946 election in the British Raj was essentially a plebiscite among Muslims over the creation of Pakistan. The Muslim League won 90 percent of reserved Muslim seats and its demand for the creation of an independent Pakistan received overwhelming popular support from the Muslims of India. August 1947 saw the end of the British Empire's reign in the subcontinent with creation of the Dominion of India (August 15th) and the Dominion of Pakistan (August 14th).
On 12 March 1949, the second constituent assembly of Pakistan passed the Objectives Resolution which proclaimed that sovereignty over the entire universe belongs to Allah alone. The promulgation of the Constitution in 1956 led to Pakistan declaring itself an Islamic republic (official name) with the adoption of a parliamentary democratic system of government. The constitution transformed the Governor-General of Pakistan into President of Pakistan (as head of state). Subsequently, Iskander Mirza became the first Bengali president in 1956, but the democratic system was stalled after President Mirza imposed a military coup d'état and appointed Ayub Khan as an enforcer of martial law. Two weeks later, President Mirza was ousted by Ayub Khan; his presidency saw an era of internal instability and a second war with India in 1965. Economic grievances and political disenfranchisement in East Pakistan led to violent political tensions and armed repression, escalating into a civil war followed by the third war with India. Pakistan's defeat in the war ultimately led to the secession of East Pakistan and the birth of Bangladesh.