The expansion of Islam did not affect Bahrain's reliance on trade, and its prosperity continued to be dependent on markets in Mesopotamia. After Baghdad emerged as the seat of the caliph in 750 and the main centre of Islamic civilization, Bahrain greatly benefited from the city's increased demand for foreign goods especially from China and South Asia. Bahrain became a hub for intellectuals for hundreds of years stretching from the early days of Islam in the 6th century to the 18th century. Philosophers of Bahrain were highly esteemed, such as the 13th century mystic, Sheikh Maitham Al Bahrani (died in 1299).