The district was created in April 1904 by the merger of Talagang Tehsil in the Jhelum District with the Pindigheb, Fatehjang and Attock tehsils from Rawalpindi District of the Punjab province of British India.
Panini was an ancient Indian scholar who was born between the 7th and 4th centuries BC in Shalatula, a town near to Attock on the Indus river in present day Pakistan. He is regarded by scholars as one of the most innovative people in the whole development of knowledge. He was a Sanskrit grammarian who gave a comprehensive and scientific theory of phonetics, phonology, and morphology.
The Astadhyayi (also known as Astaka) is Panini's major work.
In this work Panini distinguishes between the language of sacred texts and the usual language of communication. Panini gives formal production rules and definitions to describe Sanskrit grammar. Starting with about 1700 basic elements like nouns, verbs, vowels, consonants he put them into classes. The construction of sentences, compound nouns etc. is explained as ordered rules operating on underlying structures in a manner similar to modern theory. In many ways Panini's constructions are similar to the way that a mathematical function is defined today.
Gandhara was an historic region of ancient India, (which corresponds to areas of north west Pakistan including Attock). Situated astride the middle Indus River, the region had Taxila and Peshawar as its chief cities. It was originally a province of the Persian Empire and was reached (327 B.C.) by Alexander the Great. The region passed to Chandragupta, founder of the Maurya empire, in the late 4th cent. B.C., and under Asoka was converted (mid-3d cent.) to Buddhism. It was part of Bactria from the late 3d cent. to the 1st cent. B.C. Under the Kushan dynasty (1st cent.3d cent. A.D.), and especially under Kanishka, Gandhara developed a noted school of sculpture, consisting mainly of images of Buddha and relief's 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.