When was the first country formed?
It quite clearly depends on how you define the word "nation." I'll give some definitions and firsts:
Settling down and stop being nomads: First farming communities that popped up in modern-day Saudi Arabia circa 5000BCE.
Making urbanization and having a structured government: The would probably be either Indus Valley civilizations or early Chinese civilizations.
Having a structured government, division of labor, specialists, religion, etc.: This is either early mesopotamian civilizations like Sumeria or ancient Egypt.
A modern country as we know it with strict borders: Well, I'm going to divide this one into sub-sections:
Definate borders: Greek city-states
National transportation and unity: This, I would have to argue the Carthaginians, while not as powerful as the Romans at their peak, nor with the scale, they did have major influence first and a major transportation set up first. You still can argue the Romans.
Treaties and military interaction with other powers: The Romans and Etruscans
Sharing of technogy: Egyptians and Nubians
I think I covered almost everything, if not, let me know what I missed and I'll add them on in a string of edits!
When Steve was booted from Eden.
In first place it depends what you call a country. Second: There must have been social societies long before any history was recorded, who can be called countries, but they have dissapeared without traces and are therefore unknown to today mankind. The oldest known delivered histories about ancient cultures and their territories and societies are known on some Micronesian islands, by verbal delivery from generation to generation, and they trace back over 20 000 years. And they also refere to contacts with the Asian mainland, even all the way to India.
Nation is feeling of oneness among a group of people usually with in specific borders... In that sense Germany and Italy (emerged as nations after unification) were first known nations to humans. Previously states used to exist.. A state is nothing but centralised control over an area.. More the powerful (ruler) more is the area.. It's borders are not constant they keep changing depending on the control of the ruler.. And there was only feeling of loyalty to the KING (not feeling of oneness among people)
According to recent discoveries of archeology, the first "civilization" formed on Earth appears to, so far, have occurred in an area near Sanli Urfa, Turkey around the discoveries at a site called Gobekli Tepe. This huge excavation is carbon dated to around 10,000 to 11,000 BCE and is the oldest known example of a dense sophisticated stone age culture on Earth.
What also might be arguably called the first "city" in the world. Although it is currently believed that this site is a religious complex of some kind. One built by "hunter-gathers. Which is a highly arguable and dubious contention. For this "city" covers over 26 hectares and it is too large and too sophisticated to have been built by constantly roaming hunter-gatherers. Many of these stone carved structures were moved there and carved in a sophisticated manner. Such would definitely require a "resident" population merely to construct and maintain it. The only problem so far is that no permanent residences have been discovered. However, only 20% 0f the site has been excavated as well. Plus these sites may no longer have residue of permanent occupation or such evidence is further out from the main complexes.
There are also several other younger sites in the same region as Gobekli Tepe that demonstrate similar architectural and motif connections to Gobekli Tepe. Together these imply a regional culture and one that could even suggest a "country."
Sumer (in Mesopotamia) is one of the oldest known nation-states. I presume that a nation-state is what the OP means in asking about the first country.
Sumer is at least as old as 3500 BC, and may have been founded much earlier.
Mesopotamia was probably settled around 5500 BC.
There may have been older nation-states than this. But this is the oldest of which I know.