Christ’s death on the cross was an eternal event; as such, its graces could reach back in time, as well as forward. This means that the grace that Christ would win on Calvary could be applied to Mary in anticipation of Calvary. This was how she was saved from any stain of sin, both original and actual. Medieval theologians created the analogy of two people approaching a pit. If the first falls in and is rescued from the pit, and the second is prevented from falling into the pit, both are saved, and it even could be said that the one whose fall was prevented is saved far more completely than the one who was raised from the pit. See also Hail Mary, Conceived without Sin.