Depends on how you define a country. What exactly constitutes a country, is it the inhabitants, it is ruled under a singular king, what if the line of kings is broken, what if the people in the country change, how does colonialism fit in there? Is it a country if the people are of the same ethnicity but have never formally come under a singular leader?
There is indeed a good argument that Egypt for instance is the oldest African country. However by the year 500 BC, up until the modern period, Egypt was colonized by foreigners. Additionally, the pre-500 bc people didn’t call their country Egypt and would not really recognize the nations that came after as being part of their state. They would not have recognized the Persians, Turks, or Circassian rulers as being Kemetians (they called their state Kemet). Egypt comes from a temple with a similar sounding name, from the Greek language, called hi-gypt-tos, which got translated into Egypt in English. Thus I think it is fair to say ancient Egypt goes from 3100 BC from when Narmer unites lower and upper Egypt, to about 525 bc when the Persians invade and indigenous Egypt rule stops. This is impressive in its own right, about 2,500 years, that is a very long kingdom, but by no means the longest.
The longest-running kingdom that we can DOCUMENT, would have to be either Ethiopia or Nubia. Ethiopia, which was called Myrrh country by the ancient Egyptians or land of a punt, appears as early as 3000 BCE in Egyptian writings. Ethiopia was never colonized and has always maintained indigenous rule except for a brief period during WW2 when Mussolini invaded and was later repelled by a combination of Ethiopian forces, African forces under British command, and British soldiers. This would make Ethiopia about 5,000 years old.
Nubia is a close contender, Nubia may well be older than Ancient Egypt, we know the first signs of pharaonic symbols appear on the Qustul incense burner found near Qustul, in what we would call Nubia. Now there is some debate if it is Nubian or not because the Egyptians and Nubians were so similar, especially in the pre-dynastic phases, that sometimes Egyptologist cannot even tell them apart (especially during the new kingdom where they shared the same language, hieroglyphs, culture, religion, art styles, etc). Egyptologists think that Nubia A-Group is as old or possibly older than ancient Egypt. Here is where we find the first archaeoastronomical devices
On a timeline, Nubia
“Around 3500 BC, the second “Nubian” culture, termed the A-Group, arose”
Shaw, Ian; Jameson, Robert, eds. (2002). A Dictionary of Archaeology. Wiley. p. 433.ISBN 978-0-631-23583-5.
Megaliths discovered at Nabta Playa are early examples of what seems to be one of the world’s first astronomical devices, predating Stonehenge by almost 2,000 years.
This complexity as observed at Nabta Playa, and as expressed by different levels of authority within the society there, likely formed the basis for the structure of both the Neolithic society at Nabta and the Old Kingdom of Egypt.
PlanetQuest: The History of Astronomy – Retrieved on 2007-08-29
Late Neolithic megalithic structures at Nabta Playa – by Fred Wendorf (1998)
Now, this all gets into the question of where “Country starts”! I think saying it starts with the A group, would be a reasonable assessment, we find the burner around this time which suggest a unified Nubia, so anywhere from 3500-3300 bc. But then something happens.
“With the rise of the 1st dynasty in Egypt (c. 2950 BCE), the A-Group culture and Nubia’s independence were extinguished. No archaeological remains of the native Lower Nubians of the next 500 years have been discovered.” Britannica
But it re-emerges 500 years later under native rule. The Egyptians did this again in the new kingdom and for 300 years eliminate more than half the nation invading and burning its capital. It re-emerges 300 years later and more or less continued up until the 1500s with the invasions from Arabs and Ottoman Turks and another kingdom on its south side called the Sennar kingdom led by the Funj ethnic group who were Africans but were Muslims allied with the Arabs and Turks. The Funj were actually allied with Bornu of the Kanem Bornu empire which was the second-largest pre-colonial indigenous African state after the Songhai. So some argue by 1504, Nubia ends with Alodia state falling to the Funj. Others argue it ends in 1821 when an Egyptian born Albania named Muhammad Ali invades and crushes the remaining holdouts in northern Sudan. In my view, though, what we call Nubia really ends in 1504. So this would make Nubia go from 3500 BCE to 1504, with 800 years off. Making it 4204 years old. About 800 years younger than Ethiopia but 1700 older than Egypt.
So the oldest documented one is Ethiopia, but it depends on how you define the country, additionally, we may not have even found it. Archaeology is grossly undeveloped in Africa, we haven’t had large scale excavations outside of Egypt. The real answer maybe we have not found it. Part of the belief for this, is we have a 7000-year-old writing script in Nigeria called Nsibidi, we also have had Tifinagh which is a Libyco-Berber aka mande writing we find all over northern Africa from Mali to Libya, etc. used today by the Tuaregs
We have another written language going back to 3000 bc in Liberia and Sierra Leone called Vai. These countries both have had prolonged on and off civil wars and instability.
We also have proto-Saharan
Proto-Saharan (5000 B.C.)
Dr. Clyde Winters wrote that before the rise of the Egyptians and Sumerians there was a wonderful civilization in the fertile African Sahara, where people developed perhaps the world’s oldest known form of writing.
These inscriptions of what some archaeologists and linguists have termed “proto-Saharan,” near the Kharga Oasis west of what was considered Nubia, may date back as early as 5000 B.C.
So it is possible these people with writing had countries, we just haven’t yet discovered fully or documented which ended before archaeology even began. For instance, if Proto-Saharans had a continuous nation from 5500 bce and it ends in 500 ad, that would make it the oldest african country. 6000 years, but we may not even know of its existence.