Attock: History
=== Ancient period ===
Attock is located in the historical region of Gandhara. Alexander the Great, Mahmud of Ghazni, Timur, Nader Shah and Babur crossed the Indus at or about this spot (Attock Fort) in their invasions of India.
After the founding of the city by the Mughal emperor Akbar, the construction of Attock Fort was completed in 1583 under the supervision of Khawaja Shamsuddin, a minister of Akbar. During the Mughal era, Attock was part of the Lahore Subah of Punjab.
Nader Shah crossed through Attock when he defeated the Mughals at the Battle of Karnal and thus ended Mughal power in Northern India.
Attock was then occupied by the Marathas in 1758 but this conquest was short-lived as Ahmad Shah Durrani came in person to recapture Attock and checked the Maratha advance after destroying their forces at Panipat. The Sikh Empire (1799–1849) under Maharaja Ranjit Singh (1780–1839) captured the fortress of Attock in 1813 from the Durrani Nawab. After the occupation of Kashmir by Sikh Empire in 1820 many Kashmiris migrated to the plains of Attock.
In February 1849, Attock Khurd (Old Attock) was conquered by the British East India Company who created Campbellpur District. Following the Indian Rebellion in 1857, the region's strategic value was appreciated by the British, who established the Campbellpur Cantonment in 1857–58.
The Campbellpur Cantonment was established by the British colonial rulers in 1858. Campbellpur District was organised in 1904, by the division of Talagang Tehsil in the Jhelum District with the Pindigheb, Fateh Jang and Attock tehsils from Rawalpindi District. Today the Attock district consists of six tehsils: Fateh Jang, Hazro, Hasan Abdal, Jand, and Pindi Gheb.
The city's foundations were laid in 1908 and the city was named after Sir Colin Campbell, British Commander-in-Chief of India. The old city was established near the 16th century near the Attock fort that had guarded the major routes between Central Asia and South Asia. Attock's first oil well was drilled in Khaur in 1915, while the Attock Oil Company was established with a selling arrangement with the Burmah Oil Company. During 1928, the region produced 350,000 barrels of oil.
Attock was one of the northernmost points of the Punjab Province of British India prior to the partition; it thus found itself being a part of the common Hindi-Urdu phrase used to describe the length of colonial India: "Attock se Cuttack" (from Attock to Cuttack). The term "Attock se Cuttack" was first used to describe the extent of the Maratha Empire after they conquered Cuttack in 1750 and Attock in 1758.
After the independence of Pakistan in 1947, Hindu and Sikh minorities emigrated to India, while Muslim refugees from India settled in Attock. The Government of Pakistan renamed Campbellpur as Attock in 1978. The city and surrounding area are known for their high representation among soldiers of the Pakistan Army.