It became independent in 1847, not from a state but from a company, long before most of Africa. Indeed, when the continent was partitioned at the end of the 19th century, this young republic was, along with the kingdom of Ethiopia, the only one to retain its autonomy.