This church was rebuilt in 1704 according to the date engraved on the lintel of the door. It is part of the set of a domus hospitalis on the road between Gósol and Baridà. All that remains of the old building is a fragment of the semicircular apse, hidden by the surrounding buildings, and just over a meter from the north wall of the nave.

Interestingly, you can see the interior of the apse, very restored, going up to the chancel of the large altarpiece of the altar that presides over the polychrome carving of the Virgin, a faithful reproduction of the one that disappeared in 1936.

There are several versions of the legend of the finding of the Virgin of Bastanist. The most widespread legend says that around the year 1109 a shepherd from Cal Pallarès de Víllec, found the bull kneeling in front of a box tree next to Bastanist and realized that there was a Virgin Mary. He put her in the basket and when he got home the image had disappeared. The next day he found her in the same place, and so every day until it became clear with this insistence that Virgin Mary did not want to leave. They say that a snowstorm in mid-August confirmed to the whole county that it was where she wanted her sanctuary. That is why she is also known as the Virgin of the Box Tree and many virtues are attributed to the box trees of the area.

Plant and section