In Africa, were cattle domesticated before or after agriculture?

The domestication of cattle in Africa preceded agriculture and seems to have existed alongside hunter-gatherer cultures. It is speculated that by 6000 BCE, cattle were domesticated in North Africa.[57] In the Sahara-Nile complex, people domesticated many animals, including the donkey and a small screw-horned goat which was common from Algeria to Nubia.
Between 10,000 and 9,000 BCE, pottery was independently invented in the region of Mali in the savannah of West Africa.[58][59]
In the steppes and savannahs of the Sahara and Sahel in Northern West Africa, people possibly ancestral to modern Nilo-Saharan and Mandé cultures started to collect wild millet,[60] around 8000 to 6000 BCE. Later, gourds, watermelons, castor beans, and cotton were also collected.[61] Sorghum was first domesticated in Eastern Sudan around 4000 BCE, in one of the earliest instances of agriculture in human history. Its cultivation would gradually spread across Africa, before spreading to India around 2000 BCE.[62]

In Africa, cattle were domesticated before agriculture.