The history of Pakistan (Urdu: تاريخ پاكِستان) encompasses the history of the regions constituting modern day Pakistan. Prior to independence in 1947, the areas now known as Pakistan were ruled in various periods by local kings and numerous imperial powers. 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 Indian 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 British India was essentially a plebiscite among Indian Muslims over the creation of Pakistan. The Muslim League won 90 percent of reserved Muslim seats and the demand for partition and the creation of Pakistan received overwhelming popular support among Indian Muslims. Pakistan gained independence as a new state on 14 August 1947.