Afghans as a whole draw their modern national identity from the founding of the Durrani Empire in the mid 18th century. From 1747 until 1823 Ahmed Shah Durrani born in Multan, Punjab in modern day Pakistan, his sons and grandsons held the monarchy in direct session. They were the first Pashtun rulers of Afghanistan, from the Sadozai line of the Abdali (known as the Durrani since Ahmad Shah's reign) group of clans. It was under the leadership of Ahmad Shah that the nation of Afghanistan began to take shape following centuries of fragmentation and exploitation. However each ethnic group has its own unique history which makes up the entire Afghan history.
There requires some realization that Afghan nationalism can be synonymous with that of Pashtun nationalism and as a result cannot be conflated into an Afghan national identity as the country is a multiethnic entity. This is further complicated by the fact that there are now more Pashtuns (ethnic Afghans) located in Pakistan than in Afghanistan itself which has resulted in the increased usage of the term Afghanistani to denote the inhabitants of the modern state of Afghanistan and its diverse population. Thus, there have been a variety of groups who have lived in what is today Afghanistan, but were not ethnic Afghans such as the aforementioned Tajiks as well as Uzbeks and Hazaras etc. who are currently divided as to what constitutes a national Afghan identity. Because Afghan history is fraught with regional cleavages any notion of an Afghan nation-state is largely absent until the 18th century and the rise of the Durrani Empire. For this reason, important figures from the past such as Avicenna and Rumi, who were of ethnic Persian (Tajik) identity, are often not identified as ethnic Afghans or even as Afghan people, at least according to academics, while they are generally included within the context of the collective history of the modern nation-state in the geographic sense.