Since 1947 Pakistan has been involved in four conventional wars. The first occurred in Kashmir with Pakistan gaining control of Western Kashmir, (Azad Kashmir and Gilgit-Baltistan), and India retaining Eastern Kashmir (Jammu and Kashmir and Ladakh). Territorial problems eventually led to another conventional war in 1965. The issue of Bengali refugees led to another war in 1971 which resulted in Pakistan's unconditional surrender in East Pakistan. Tensions in Kargil brought the two countries at the brink of war. Since 1947 the unresolved territorial problems with Afghanistan saw border skirmishes which were kept mostly at the mountainous border. In 1961, the military and intelligence community repelled the Afghan incursion in the Bajaur Agency near the Durand Line border.