In the year 86 AH / 705 AD, during the reign of al-Walid Ibn Abd al-Malik, Mousa Ibn Nasir ruled Maghrib: the West, the whole countries extending from Spain to Tunisia, which formed the western part of the Islamic world. He was able to control the Berbers, and secure the region, and he was able to open Tangier. He then appointed Tarek Ibn Ziad, who camped with the Muslims on the coasts of the Zuqaq Sea, later to be called after his name: Strait of Gibraltar (Arabic: Jabal Tareq). They began to turn their eyes towards Spain, which had been under the Goths rule since 507 AD, but their order began to weaken as the country was divided into small emirates belonging to the King of Toledo.
Tarek boarded 7,000 Muslims, to be later supported by 5,000 more, and the ships docked off Algeciras on a mountain later named Gibraltar (also called the Mount of Conquest/Opening: Jabal al-Fateh). The Muslims marched towards Cordoba, to confront the Spaniards who assembled a huge army of 70,000 to 100,000. The fighting began on Sunday, the 28th of Ramadan in 92 AH, corresponding to the 19th of July 711 AD. The Spanish showed great ability at the beginning of the battle, and resist the pressure of the Muslims, but soon their army collapsed and they were defeated. The Muslims occupied their camp in Cordoba and went on to open the other major cities. They opened Shazuna, Mudawara, Qarmuna, Seville and Tuleitila. Mousa then ordered Tarek to stop because he had penetrated too much, and then he crossed into Andalusia after a distress addressed to him by Tarek. He arrived in the month of Ramadan of the year 93 AH, with an army of eighteen thousand, and opened some more cities that Tarek did not open.
The Muslims remained in Andalusia for eight centuries, after they established a prosperous civilization whose marvelous traces still remain to this day.