Afri (singular Afer) were the inhabitants of Africa, referring in its widest sense to the entirety of North Africa. Latin speakers at first used afer as an adjective, meaning "of Africa". As a substantive, it denoted a native of Africa; i.e., an African.
The ultimate etymology of the term for the country remains uncertain. It may derive from a Punic term for an indigenous population of the area surrounding Carthage. (See Terence for discussion.) The name is usually connected with Phoenician ʿafar "dust" (also found in other Semitic languages), but a 1981 hypothesis asserted that it stems from the Berber ifri (plural ifran) "cave", in reference to cave dwellers. (See Tataouine.) The same word may be found in the name of the Banu Ifran from Algeria and Tripolitania, a Berber tribe originally from Yafran (also known as Ifrane) in northwestern Libya. The classical historian Flavius Josephus asserted that descendants of Abraham's grandson Epher invaded the region and gave it their own name.
This ethnonym provided the source of the term Africa. The Romans referred to the region as Africa terra (land of the Afri), based on the stem Afr- with the adjective suffix -ic, giving Africus, Africa, Africum in the nominative singular of the three Latin genders. Following the defeat of Carthage in the Third Punic War, Rome set up the province of Africa Proconsularis. Afer came to be a cognomen for people from this province.
The Germanic tribe of the Vandals conquered the Roman Diocese of Africa in the 5th century; the empire reconquered it as the Praetorian prefecture of Africa in AD 534. The Latin name Africa came into Arabic after the Islamic conquest as Ifriqiya.
The name survives today as Ifira and Ifri-n-Dellal in Greater Kabylie (Algeria). A Berber tribe was called Banu Ifran by Medieval Muslim writers, and Ifurace was the name of a Tripolitan people in the 6th century.