It is the most important monument of the town. It was erected in 1779, in a pure neoclassical style, by the architect Ventura Rodríguez -which links it to the temples of Santa Fe and Vélez de Benaudalla-, and paid for by the V Marquis of Algarinejo.
The building stands on the site of a primitive church, also dedicated to Santa María la Mayor, which existed in Algarinejo from the 16th century until 1772, when it was demolished for the construction of the new temple, according to the Book First Old from the parish archive.
Fourteen and a half years would take to erect the new church, from 1779 to 1794. The person in charge of the project was Ventura Rodríguez, municipal architect of Madrid, and with works as emblematic as the Cibeles fountain or the dressing room of the Virgen del Pilar in Zaragoza. He was also director of the architecture section of the Academy of San Fernando from 1752. The architects Francisco Aguado and Francisco Quintillán intervened in the direction of the work.
The famous architect projects a large building, governed by austerity and scrupulous symmetry, with an absence of superfluous decorative motifs. It has a Latin cross plan, with a large dome on the transept made of brick, and it has three naves. The central nave is the most important, both for its height and its width. It is separated from the side naves -in which several chapels open- by simple pillars and semicircular arches, and is covered by a semi-barrel vault with transverse arches. The main altar is square in plan, covered with a half-barrel vault and topped by a semicircular triumphal arch. It is presided over by a tabernacle with Doric columns. On both sides of the main altar is the sacristy and the chapel of Nuestro Padre Jesús Nazareno.
The interior of the church was covered by a layer of plaster, apparently as a disinfectant against outbreaks of epidemics. It remained like this until the 80s when it was restored. At present, the interior of the temple is practically bare, except for some frames in the windows, doors, pediments and cornices.. It combines semicircular openings, blind oculi and lintelled windows. The tower that appears behind the head of the temple stands out.
On the outside, a sundial stands out, with a circular stone sphere, embedded in one of its corners, dating from the year 1790.
The church has three portals made of hewn stone. The main façade, facing south, is located at the foot of the temple and is preceded by two stands. It is arranged by means of a lintelled door, framed by a molding and a curved pediment.
Above, a blind oculus and, finally, a triangular pediment resulting from the gabled roof of the nave, pierced in its center by a lintelled opening.
The immense size of the temple, compared to the population that Algarinejo must have had in the 18th century, is due, according to legend, to a promise made by the V Marquis of Algarinejo: Francisco de Paula Fernández de Córdova. The nobleman, who was also the Marquis of Cardeñosa, of Valenzuela, Count of Luque and Lord of the town of Zuheros, was in Madrid when he was attacked by a serious illness from which he planned to die. In his plight, he entrusted himself to Our Father Jesus of Algarinejo, and offered him, if he healed, to erect a church for him in the town to the best of his ability. The nobleman was cured and his large income, taking into account that he had the greatest fortune of all the non-great nobles in Spain, was invested in the construction of the new church. This legend is reflected in a canvas that hangs in the parish tabernacle chapel, which also houses interesting neoclassical altarpieces inside.