This church was built on the site of a former mosque. It was built during the time of the Reconquista.
After several renovation projects in the mid-17th century, this church was enlarged and this is the building we see today. The final building stage lasted well in to the mid-18th century. However, as it was built on clay ground, the main chapel had to be removed, so it was rebuilt in 1749. It was only at the very end of the 18th century that this church was finally finished.