In 711 CE, the Moors invaded Spain and established Islamic rule. During this period, philosophy, mathematics, and science flourished in the nation. For instance, Ibn Zuhr, a physician and surgeon, tested medical procedures on animals before using them on humans. His work was translated into Latin and Hebrew and had a significant impact on the medical field. Spain remained closely connected to Baghdad for 200 years before becoming independent. Spain was one of the wealthiest areas of Europe during the period of Moorish rule.
Based on the passage, how did the Moorish invasion of Spain affect civilization in the region?