European interior ministers have agreed to make incitement to racism an EU-wide crime, but have stopped short of a blanket ban on Holocaust denial.
The text does not cover all cases of inciting hatred against a religion
The agreement makes it an offence to condone or grossly trivialise crimes of genocide - but only if the effect is incitement to violence or hatred.
The deal follows six years of talks, and will disappoint Germany, which pushed hard for a Holocaust-denial law.
Berlin has also had to drop a proposal for an EU-wide ban on Nazi symbols.
The European Network Against Racism said most European countries already had laws against incitement to racism, and the "weak text" would leave many national legal codes unchanged.
Films and plays
Under the agreement, incitement to hatred or violence against a group or a person based on colour, race, national or ethnic origin must be punishable by at least a year in jail.
However, member states can choose to limit prosecutions to cases likely to disturb public order.
STATES WITH HOLOCAUST DENIAL LAWS
Punishing incitement to hatred against religion will only be compulsory in cases where it amounts to inciting hatred against a national or ethnic group, race or colour.
Some countries will have to put the agreement to parliamentary vote, before it is finally adopted. Each member state will then have two years to bring its laws into compliance.
Officials said the wording was carefully designed to avoid criminalising films or plays about genocide, or discouraging academic research.
But dissemination of "tracts, pictures or other material" is punishable if it is designed to incite violence or hatred.
Freedom of speech
The chief difficulty holding up an agreement, since the proposal was first put forward in 2001, was the concern of some states that it would impinge on freedom of speech.
The text of the decision says the new rules will not modify the obligation to respect fundamental legal principles, including freedom of expression and association.
Countries where it is already a crime to deny the Holocaust will stick to their existing rules, but other countries will not be obliged to help them with judicial investigations.