It was completely rebuilt in 673 by the governor Maslama ibn Mukhallad al-Ansari, who added four minarets, one at each of the mosque's corners, and doubled its area in size. The addition of these minarets allowed the call to prayer to be heard from every corner, and taken up by other nearby mosques. Governor Abd al-Aziz ibn Marwan added an extension to the mosque in 698 and once again doubled the mosque's area. In 711 a concave prayer niche was added to replace the flat one. In 827, it had seven new aisles built, parallel to the wall of the qibla, the direction that Muslims were to face during prayer. Each aisle had an arcade of columns, with the last column in each row attached to the wall by means of a wooden architrave carved with a frieze.