Article 400 of Mexico’s Federal Penal Code punishes encubrimiento, concealment, which includes hiding a person who has committed a crime. The article then names people to whom the penalty for hiding the offender does not apply.
Besides close relatives, the list includes “Los que estén ligados con el delincuente por amor, respeto, gratitud o estrecha amistad derivados de motivos nobles” (those bound to the offender by love, respect, gratitude or close friendship arising from noble motives).