 It was built using the ruins that had a previous church in the same place.The primitive church in turn was previously occupied by a mosque located next to the albarrana tower in what was later the Palacio de Laso de Castilla, residence of the Catholic Monarchs and Cardinal Cisneros when they were in Madrid.The previous church had been frequented as a parish church by the patron saint of Madrid, St. Isidore the Laborer, and his wife Santa María de la Cabeza, who lived nearby.