The military history of Pakistan () encompasses an immense panorama of conflicts and struggles extending for more than 2,000 years across areas constituting modern Pakistan and greater South Asia. The history of the modern-day military of Pakistan began in 1947, when Pakistan achieved its independence as a modern nation. The military holds a significant place in the history of Pakistan, as the Pakistani Armed Forces have played, and continue to play, a significant role in the Pakistani establishment and shaping of the country. Although Pakistan was founded as a democracy after its independence from the British Raj, the military has remained one of the country's most powerful institutions and has on occasion overthrown democratically elected civilian governments on the basis of self-assessed mismanagement and corruption. Successive governments have made sure that the military was consulted before they took key decisions, especially when those decisions related to the Kashmir conflict and foreign policy. Political leaders of Pakistan are aware that the military has stepped into the political arena through coup d'état to establish military dictatorships, and could do so again. The Pakistani Armed Forces were created in 1947 by division of the British Indian Army. Pakistan was given units such as the Khyber Rifles, which had seen intensive service in World Wars I and II. Many of the early leaders of the military had fought in both world wars. Military history and culture is used to inspire and embolden modern-day troops, using historic names for medals, combat divisions, and domestically produced weapons. Since the time of independence, the military has fought three major wars with India. It has also fought a limited conflict at Kargil with India after acquiring nuclear capabilities. In addition, there have been several minor border skirmishes with neighbouring Afghanistan. After the September 11 attacks, the military is engaged in a protracted low intensity conflict along Pakistan's western border with Afghanistan, with the Taliban and Al-Qaeda militants, as well as those who support or provide shelter to them. In addition, Pakistani troops have also participated in various foreign conflicts, usually acting as United Nations peacekeepers. At present, Pakistan has the largest number of its personnel acting under the United Nations with the number standing at 10,173 as of 31 March 2007. 550 BCE–1857 Ancient empires The region of modern-day Pakistan (part of British Raj before 1947) formed the most-populous, easternmost and richest satrapy of the Persian Achaemenid Empire