Christian tombs at Zaragoza, dating from Roman days, appear to bear images representing the Assumption of the Blessed Virgin.
In the 4th century, the presence of votive images placed on columns or pillars is attested.
The oldest written testimony of devotion to the Blessed Virgin in Zaragoza is usually identified as that of Pedro Librana in 1155. There is evidence that the site attracted pilgrims from across the Iberian Peninsula during the 13th century, e.g. reflected in the work Milagros de Nuestra Señora by Gonzalo de Berceo, dated to the 1250s or early 1260s. The appellation Santa María del Pilar is attested for 1299.
The claim that the first church had been the oldest in Hispania, built in AD 40 by James the Greater, is first recorded in 1318.
The tradition of the Marian apparition can be traced to the 15th century: In either 1434 or 1435, a fire destroyed the alabaster altarpiece. The replacement altarpiece features bas-relief representations of the Marian apparition. The image of the Virgen del Pilar venerated today also dates to this period. It executed in the late Gothic style of Juan de la Huerta.
Pope Calixtus III in a bull issued 23 September 1456 declares seven years' indulgence for those who visit Our Lady of Zaragoza. The text of the bull specifically mentions a pillar, for the first time suggesting the existence of an image known as Our Lady of the Pillar.
The feast day of 12 October was officially introduced by the Council of Zaragoza in 1640.
According to the account by María de Ágreda (d. 1665) in her Mystical City of God, Mary, mother of Jesus, was transported from Jerusalem to Hispania during the night, on a cloud carried by angels. During the journey, the angels also built a pillar of marble, and a miniature image of Mary with the Child Jesus.
The apparition of Our Lady of the Pillar was accepted as canonical by Pope Innocent XIII in 1723.
So many contradictions had arisen concerning the miraculous origin of the church that Spain appealed to Innocent XIII to settle the controversy. After careful investigation, the twelve cardinals, in whose hands the affair rested, adopted the following account, which was approved by the Sacred Congregation of Rites on 7 August 1723, and later inserted in the lessons of the office of the feast of our Lady of the Pillar, celebrated on 12 October:
Of all the places that Spain offers for the veneration of the devout, the most illustrious is doubtless the sanctuary consecrated to God under the invocation of the Blessed Virgin, under the title of our Lady of the Pillar, at Saragossa.
According to ancient and pious tradition, St. James the Greater, led by Providence into Spain, spent some time at Saragossa. He there received a signal favor from the Blessed Virgin. As he was praying with his disciples one night, upon the banks of the Ebro, as the same tradition informs us, the Mother of God, who still lived, appeared to him, and commanded him to erect an oratory in that place. The apostle delayed not to obey this injunction, and with the assistance of his disciples soon constructed a small chapel. In the course of time a larger church was built and dedicated, which, with the dedication of Saint Saviour's, is kept as a festival in the city and Diocese of Saragossa on the 4th of October.
James returned to Jerusalem with some of his disciples where he became a martyr, beheaded in AD 44 during the reign of Herod Agrippa. His disciples allegedly returned his body to Spain. The year AD 40 is the earliest recognised Marian apparition in the Catholic Church, dating to a time when Mary, the mother of Jesus, was still alive.
Pope Clement XII allowed the celebration of the feast of Our Lady of the Pillar all over the Spanish Empire in 1730. As the date coincides with the discovery of the Americas, the lady was later named as Patroness of the Hispanic World.