1. Those who, with the aim of harming the authority of the State or compromising the dignity or vital interests of Spain, maintain intelligence or relations of any kind with foreign governments, their agents, or with international or foreign groups, organizations, or associations, shall be punished with a prison sentence of four to eight years.
2. Anyone who carries out the acts referred to in the preceding paragraph with the intention of provoking a war or rebellion shall be punished in accordance with Articles 581, 473, or 475 of this Code, as applicable.