Khairpur was established by the Talpur dynasty in 1783. Conquered by the British in 1843 following the Battle of Miani, Mir Sher Muhammad Talpur eventually gave up attempts to regain control of the area after a decade and entered into treaty with the British, thereby maintaining some autonomy as a princely state. The last Mir of Khairpur opted to join the new state of Pakistan in 1947, and the dominion was thus made a princely state of Pakistan, until it was fully amalgamated into West Pakistan in 1955.[2]