In Africa, were cattle domesticated before or after agriculture?

Context: 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. 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.
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, around 8000 to 6000 BCE. Later, gourds, watermelons, castor beans, and cotton were also collected. 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.

Answer: In Africa, cattle were domesticated before agriculture.