The city of Baghdad was economically important in part because it

controlled trade routes between Muslim Spain and Mughal India.
traded with Africa along the famous Silk Road.
was linked to China and other lands by camel caravan routes.
produced all the goods it needed for itself.

was linked to China and other lands by camel caravan routes.