1. The following shall be punished with imprisonment for one to five years:
a) Anyone who recruits or uses minors or persons with disabilities in need of special protection for exhibitionist or pornographic purposes or performances, whether public or private, or to produce any kind of pornographic material, regardless of its medium, or who finances any of these activities or profits from them.
b) Anyone who produces, sells, distributes, exhibits, offers, or facilitates the production, sale, dissemination, or exhibition by any means of child pornography or pornography in the production of which persons with disabilities in need of special protection have been used, or possesses such material for these purposes, even if the material originated abroad or its origin is unknown.
For the purposes of this Title, child pornography or pornography in the production of which persons with disabilities in need of special protection have been used is considered to be:
a) Any material that visually depicts a minor or a person with a disability in need of special protection participating in sexually explicit conduct, whether real or simulated.
b) Any representation of the sexual organs of a minor or a person with a disability in need of special protection for primarily sexual purposes.
c) Any material that visually depicts a person who appears to be a minor engaging in sexually explicit conduct, whether real or simulated, or any representation of the sexual organs of a person who appears to be a minor, for primarily sexual purposes, unless the person who appears to be a minor is actually eighteen years of age or older at the time the images were obtained.
d) Realistic images of a minor engaging in sexually explicit conduct or realistic images of the sexual organs of a minor, for primarily sexual purposes.
2. Those who commit the acts described in paragraph 1 of this article shall be punished with imprisonment for five to nine years when any of the following circumstances apply:
a) When minors under sixteen years of age are used.
b) When the acts are of a particularly degrading or humiliating nature, physical or sexual violence is used to obtain the pornographic material, or scenes of physical or sexual violence are depicted.
c) When minors in a particularly vulnerable situation due to illness, disability, or any other circumstance are used.
d) When the perpetrator has intentionally or through gross negligence endangered the life or health of the victim.
e) When the pornographic material is of significant importance.
f) When the perpetrator belongs to an organization or association, even a temporary one, dedicated to carrying out such activities.
g) When the perpetrator is an ascendant, guardian, curator, custodian, teacher, or any other person in charge, de facto, even temporarily, or de jure, of the minor or person with a disability in need of special protection, or is any person who lives with them or another person who has acted abusing their recognized position of trust or authority.
h) When the aggravating circumstance of recidivism is present.
3. If the acts referred to in point (a) of the first paragraph of section 1 were committed with violence or intimidation, the penalty shall be one degree higher than those provided for in the preceding sections.
4. Anyone who knowingly attends exhibitionist or pornographic shows involving minors or persons with disabilities in need of special protection shall be punished with imprisonment for six months to two years.
5. Anyone who acquires or possesses child pornography for their own use, or pornography in the production of which persons with disabilities in need of special protection were used, shall be punished with imprisonment for three months to one year or a fine of six months to two years.
The same penalty shall be imposed on anyone who knowingly accesses child pornography or pornography in the production of which persons with disabilities in need of special protection were used, by means of information and communication technologies.
6. Anyone who has under their authority, guardianship, custody, or foster care a minor or a person with a disability in need of special protection, and who, knowing of their state of prostitution or corruption, fails to do everything possible to prevent their continuation in such a state, or fails to report them to the competent authority for the same purpose if they lack the means to care for the minor or person with a disability in need of special protection, shall be punished with imprisonment for three to six months or a fine of six to twelve months.
7. The Public Prosecutor's Office shall initiate the appropriate legal proceedings to deprive of parental authority, guardianship, custody, or foster care, as applicable, any person who engages in any of the conduct described in the preceding paragraph.
8. Judges and courts shall order the adoption of the necessary measures for the removal of websites or internet applications that contain or disseminate child pornography or in whose production persons with disabilities in need of special protection have been used, or, where appropriate, to block access to them for internet users located in Spanish territory.
These measures may be ordered as a precautionary measure at the request of the Public Prosecutor's Office.