Most people so often say Ghana was the first country(1957), however they were the first nation south of the Sahara. Libya(1951) and Egypt(1953) were the first African countries. Zimbabwe
Liberia was instituted as a free country (originally an exclave for unwanted 'african-americans') in 1847. In some senses it is the oldest independent country in sub-Saharan Africa.
The Republic of South Africa was arguably never colonised - but that also is a complicated story.
Ethiopia
liberia
South Africa in 1910
Haiti,a Caribbean island under French rule, was the first country in Latin America to gain independence.
"gaining independence" usually prescribes a "from" in the end of it, followed by the name of country/hegemon. Historically (in Europe), I suppose first countries/nations got their independence with the collapse of Roman Empire, - more so the ones on the outskirts of Empire. So one may guess England and France, Balkan nations, as well as Middle East countries to be those among first ones to gain independence :)
South Africa was the last to gain independence in 1994. Eritrea was second to last in 1993.
Great Britain
South Africa.
Liberia
Samoa was the first pacific country to gain their independence
South Africa in 1910
The first country ever to gain independence was San Marino who achieved independence from the Roman Empire.
haitiThe first Latin American country to gain its independence was Haiti.
South Sudan
Namibia gained independence from South Africa in 1990
Ghana. It was the first subsaharan country to gain independence in 1957. No civil war or violence for 55 years
Gold Coast
It was part of French West Africa: France.
Algeria, 3 July 1962