|• Total||6,857 km2 (2,648 sq mi)|
|Time zone||PKT (UTC5)|
|Postal code span||43600|
Attock (Punjabi, Urdu: اٹک) formerly Campbellpur, is a city located in the northern border of the Punjab province of Pakistan and the headquarters of Attock District. In the 1901 census, Attock was reported to have had a population of 2866 people, a figure which has grown dramatically during the 20th century with 69,588 reported in the 1998 census and contemporary estimates approaching 100,000.
Gandhara was an ancient kingdom extending to the Swat valley and the Potohar plateau regions of Pakistan as well as the Jalalabad district of northeastern Afghanistan. Situated astride the middle Indus River, the region had Takshashila and Peshawar as its chief cities. It was conquered by the Persian Empire and later in 327 BC by Alexander the Great. The region occupied by Chandragupta, founder of the Maurya empire, in the late 4th century BC, and under Ashoka was converted in the mid-3rd century BC to Buddhism. It was part of Bactria from the late 3rd century to the 1st century BC. Under the Kushan dynasty (1st century–3rd century AD), and especially under Kanishka, Gandhara developed a noted school of sculpture, consisting mainly of images of Buddha and reliefs representing scenes from Buddhist texts, but with marked Greco-Roman elements of style. The art form flourished in Gandhara until the 5th century, when the region was conquered by the Huns. The whole region formed part of the Kingdom of Ederatides the Greek, who extended his power over western Punjab. The Indo-Greek kings held the country after him, being at last ousted (about 80 B.C.) by the Indo-Scythians. When the Chinese pilgrim Xuanzang visited the Attock district in A.D., 630 and again in A.D., 643, he reported that Buddhism was declining in the region.
In the early 11th century, Sultan Mahmud Ghaznavi launched seventeen expeditions into South Asia. In 1001, he defeated Raja Jayapala of the Hindu Shahi Dynasty of Gandhara in the Battle of Peshawar and marched further into Peshawar and, in 1005, made it the center for his empire. Attock became part of Ghaznavid Empire.
The Battle of Attock took place on 28 April 1758 between Indian Maratha Kingdom and the Durrani Empire. The Marathas under Raghunathrao Ballal Peshwa and Maharaja Tukojirao Holkar Bahadur were victorious in the battle and Attock was captured. In 1849, Attock conquered by the British who created Campbellpur District. After 1947, the Pakistani Government renamed it as Attock in 1978. On 8 May 1758, the Marathas defeated Durrani forces in the Battle of Peshawar and captured the city of Peshawar. Marathas had now reached the Afghanistan border. Ahmad Shah Durrani got alarmed with this success of Marathas and started planning to recapture his lost territories.
After the decline of the Mughal Empire, the Sikhs invaded and occupied Attock District. The Sikhs established religious freedom and respected the native Muslims. The Sikh Kingdom (1799–1849) under Maharaja Ranjit Singh (1780–1839) captured the fortress of Attock in 1813 from the Afghan Kingdom.
The city's foundations were laid in 1903, and it was named Campbellpur after Sir Colin Campbell. It was established near Attock fort that had guarded the major routes towards Central Asia. The district was created in April 1904 by the merger of Talagang Tehsil in the Jhelum District with the Pindigheb, Fateh Jang and Attock tehsils from Rawalpindi District of the Punjab province of British Raj.
The predominantly Muslim population supported the Muslim League and the Pakistan Movement. After the independence of Pakistan in 1947, the minority Hindus and Sikhs emigrated to India, while Muslim refugees from India settled in Attock.
According to the Alif Ailaan Pakistan District Education Rankings 2014, Attock is ranked 3 out of 146 districts in Pakistan in terms of the quality of education. For facilities and infrastructure, the district is ranked 17 out of 146.  A detailed picture of the district's education performance is also available online. 
- Haryana (India). Gazetteers Organisation (2000). Haryana District Gazetteers: Imperial gazetteer of India (provincial series), Punjab, 1908 (v. 2). Gazetteers Organisation, Revenue Dept., Haryana. Retrieved 18 July 2011.
- "Attock". World Gazeteer. Retrieved 18 July 2011.
- Balfour, Edward (1885). The cyclopædia of India and of eastern and southern Asia, commercial industrial, and scientific: products of the mineral, vegetable, and animal kingdoms, useful arts and manufactures. Bernard Quaritch. p. 419. Retrieved 17 July 2011.
- Ripley, George (1863). The New American Cyclopaedia: A popular Dictionary of general Knowledge. D. Appleton and Company. p. 330. Retrieved 17 July 2011.
- Hasan, Shaikh Khurshid (2005). Historical forts in Pakistan. National Institute of Historical & Cultural Research Centre of Excellence, Quaid-i-Azam University. p. 37. ISBN 978-969-415-069-7. Retrieved 17 July 2011.
- World oil. Gulf Publishing Company. March 1947. p. 12. Retrieved 17 July 2011.
- "Alif Ailaan Pakistan District Education Rankings, 2014" (PDF). Alif Ailaan. Retrieved 2014-05-06.
- "Individual district profile link, 2014" (PDF). Alif Ailaan. Retrieved 2014-05-06.