Article 172 [source]

Spanish Criminal Code
English translation

1. Anyone who, without legal authorization, prevents another person by force from doing what the law does not prohibit, or compels them to do what they do not want to do, whether just or unjust, shall be punished with imprisonment for six months to three years or with a fine of 12 to 24 months, depending on the severity of the coercion or the means employed.

When the coercion is intended to prevent the exercise of a fundamental right, the penalties shall be imposed in their upper half, unless the act is subject to a greater penalty under another provision of this Code.

The penalties shall also be imposed in their upper half when the coercion is intended to prevent the legitimate enjoyment of housing.

2. Anyone who, in a minor way, coerces their current or former spouse, or a woman with whom they have or have had a similar relationship of affection, even without cohabitation, shall be punished with imprisonment for six months to one year or community service for thirty-one to eighty days and, in all cases, deprivation of the right to possess and carry firearms for one year and one day to three years, as well as, when the Judge or Court deems it appropriate in the best interests of the minor or person with a disability in need of special protection, special disqualification from exercising parental authority, guardianship, curatorship, custody, or foster care for up to five years.

The same penalty shall be imposed on anyone who, in a minor way, coerces a particularly vulnerable person who lives with the perpetrator.

The penalty shall be imposed in its upper half when the crime is committed in the presence of minors, or takes place in the shared residence or the victim's residence, or is committed in violation of a penalty stipulated in Article 48 of this Code or a precautionary or security measure of the same nature.

Notwithstanding the provisions of the preceding paragraphs, the Judge or Court, stating the reasons for doing so in the judgment, may, taking into account the personal circumstances of the perpetrator and those present at the time of the act, impose a lesser penalty.

3. Outside of the cases mentioned above, anyone who causes minor coercion to another shall be punished with a fine of one to three months. This act shall only be prosecuted upon complaint by the aggrieved person or their legal representative.

When the offended party is one of the persons referred to in section 2 of article 173, the penalty shall be permanent location for five to thirty days, always in a different and distant address from that of the victim, or community service for five to thirty days, or a fine of one to four months, the latter only in the cases in which the circumstances expressed in section 2 of article 84 occur.

In these cases the complaint referred to in the previous paragraph will not be required.