The Spanish preterite perfect or past anterior is used to indicate an action in the past that occurred just before another action in the past.