1. Anyone who intentionally assists a person who is not a national of a Member State of the European Union to enter Spanish territory or to transit through it in a manner that violates legislation on the entry or transit of foreigners shall be punished with a fine of three to twelve months or imprisonment of three months to one year.
Such acts shall not be punishable when the perpetrator's sole objective is to provide humanitarian assistance to the person in question.
If the acts are committed for profit, the penalty shall be imposed in its upper half.
2. Anyone who intentionally assists, for profit, a person who is not a national of a Member State of the European Union to remain in Spain, violating legislation on the stay of foreigners, shall be punished with a fine of three to twelve months or imprisonment of three months to one year.
3. The acts referred to in paragraph 1 of this article shall be punished with a prison sentence of four to eight years when any of the following circumstances apply:
a) When the acts have been committed within an organization dedicated to carrying out such activities. When the perpetrators are the heads, administrators, or managers of said organizations or associations, they shall be subject to the upper half of the sentence, which may be increased to the next higher degree.
b) When the life of the persons subject to the offense has been endangered, or the risk of causing serious injury has been created.
4. Those who commit the acts by taking advantage of their position as an authority, agent thereof, or public official shall incur the same penalties as in the preceding paragraph, and in addition, absolute disqualification from holding public office for six to twelve years.
5. When, in accordance with the provisions of Article 31 bis, a legal entity is held responsible for the offenses set forth in this Title, it shall be subject to a fine of two to five years, or a fine of three to five times the profit obtained if the resulting amount is higher. Subject to the rules established in Article 66 bis, the courts may also impose the penalties set forth in subparagraphs b) through g) of paragraph 7 of Article 33.
6. The courts, taking into account the seriousness of the offense and its circumstances, the conditions of the offender, and the purpose pursued by the offender, may impose a penalty one degree lower than the one respectively indicated.