Swedish Criminal Code, Ds 1999:36 (excerpts)

Chapter 5 Section 5 (Defamation)

Crimes mentioned in Sections 1-3 may not be prosecuted by other than the injured party. If, however, the injured party notifies the crime for prosecution, and if for special reasons prosecution is considered necessary in the public interest, a prosecutor may prosecute for:
1. defamation and gross defamation,
2. insulting behaviour towards a person exercising, or for the exercise of, his or her duties in office,
3. insulting behaviour towards a person with allusion to his or her race, colour, national or ethnic origin or religious belief, or

Chapter 16 Section 8
Any person who in a statement or communication that is disseminated threatens or expresses contempt for a national or ethnic group or other such group of persons with allusion to race, skin colour, national or ethnic origin, creed or sexual orientation, shall be sentenced for agitation against an ethnic group to imprisonment for at most two years or, if the offence is minor, to pay a fine.
If the offence is grave, a sentence of imprisonment for at least six months and at most four years shall be imposed.
In judging whether the offence is grave, special consideration shall be given to whether the communication had a particularly threatening or insulting content and was disseminated to a large number of people in a way that was likely to attract particular attention.