The ethnonym Afghan (Dari/Pashto: افغان) has been used historically to refer to the Pashtuns. Since the second half of the twentieth century, the term "Afghan" evolved into a demonym for all residents of Afghanistan, including those outside of the Pashtun ethnicity.
The earliest mention of the name Afghan (Abgân) is by Shapur I of the Sassanid Empire during the 3rd century CE. In the 4th century, the word "Afghans/Afghana" (αβγανανο) as a reference to a particular people is mentioned in the Bactrian documents found in Northern Afghanistan.
"To Ormuzd Bunukan ,from Bredag Watanan ... greetings and homage from ... ) , the ( sotang ( ? ) of Parpaz ( under ) [ the glorious ) yabghu of Hephthal , the chief of the Afghans , ' the judge of Tukharistan and Gharchistan . Moreover , ' a letter [ has come hither ] from you , so I have heard how [ you have ] written ' ' to me concerning ] my health . I arrived in good health , ( and ) ( afterwards ( ? ) ' ' I heard that a message ] was sent thither to you ( saying ) thus : ... look after the farming but the order was given to you thus. You should hand over the grain and then request it from the citizens store: I will not order, so.....I Myself order And I in Respect of winter sends men thither to you then look after the farming, To Ormuzd Bunukan, Greetings"
"because [you] (pl.), the clan of the Afghans, said thus to me:...And you should not have denied? the men of Rob [that] the Afghans took (away) the horses""[To ...]-bid the Afghan... Moreover, they are in [War]nu(?) because of the Afghans, so [you should] impose a penalty on Nat Kharagan ... ...lord of Warnu with ... ... ...the Afghan... ... "
The term "Afghan" is later recorded in the 6th century CE in the form of "Avagāṇa" [अवगाण] by the Indian astronomer Varāha Mihira in his Brihat-samhita.
"It would be unfavourable to the people of Chola, the Afghans (Avagāṇa), the white Huns and the Chinese."
The word Afghan also appeared in the 982 Ḥudūd al-ʿĀlam, where a reference is made to the village of Saul, which was probably located near Gardez, in the Paktia province of Afghanistan.