The Mezquita (Spanish for "mosque") of Cordoba is a Roman Catholic cathedral. It used to be a mosque in the Andalusian city of Córdoba, Spain. At first the site had been used for a temple, then a Christian cathedral. Under the rule of Islam, it was built as the second-largest mosque in the world. It is perhaps the most accomplished monument of the Umayyad dynasty of Cordoba. It changed into mosque in Middle Ages. After the Spanish Reconquista, it was changed back into a church, and some of the Islamic columns and arcs were replaced by a basilica in early Baroque style. Many early mosques have a square or rectangular plan. They also have a prayer hall and an enclosed courtyard. This is known as Arab-plan. The first mosques of this type were built during the Umayyad Dynasty.