Nicolás Enríquez
The Apparition of the Virgin of el Pilar to St. James

1773
Oil on copper
Metropolitan Museum of Art, 2014.175

The Virgin of Pilar is a statue on a pillar in a church in Zaragoza, Spain (image). The story behind the statue was summarized by Manuel Aramburu in 1766:

It is a constant tradition, received and verified not only in this city, in the Reign of Aragon, and in all Spain, but also in all Europe and beyond, that in the year 40 AD while St. James the Greater was preaching the Holy Gospel…in this blessed city of Zaragoza, at a time when he was praying in the middle of the night (according to pious opinion) with his disciples on the banks of the Ebro, the Blessed Mary, Mother of God and Protector of Sinners, appeared to him in the flesh, full of majesty and accompanied by many angels who were singing diverse songs of praise. Some of the angelic spirits were carrying the sacred image that we venerate today with such joy, along with a column of jasper. She told the holy apostle to build a chapel in that place, to put the image on the column inside it, and to dedicate it to God in her honor.
(Aramburu, 3 – my translation)
The first chapter of Aramburu's book (1-56) goes on to cite scores of documentary witnesses relating to the tradition, although according to the Catholic Encyclopedia (s.v. "Nuestra Seņora Del Pilar") none of them is older than a letter written in 1155.

The Enríquez painting captures the event recounted in Aramburu. It is night. On the banks of the Ebro St. James has gathered with his disciples. (A seashell on the elbow of his mantle identifies him). They all kneel in reverence to the image on the pillar, which is surrounded by angels. The statue depicted on the pillar is of course a faithful copy of the actual statue still in Zaragoza.

Two details are not specifically mentioned in Aramburu: the Christ Child in Mary's arms, and the presence of a woman among the disciples.

A Madonna and Child in Italy places Mary and the baby in Heaven just above the pillar where Jesus is being scourged. It is possible that the Pilar tradition was an influence.

This image in full resolution
More of Portraits of the Virgin Mary
More of St. James the Greater

Photographed at the museum by Richard Stracke, shared under Attribution-NonCommercial-ShareAlike license.