Among the ways in which freedom is being chipped away in Europe, one of the less obvious is the legislation of memory. More and more countries have laws saying you must remember and describe this or that historical event in a certain way, sometimes on pain of criminal prosecution if you give the wrong answer. What the wrong answer is depends on where you are. In Switzerland, you get prosecuted for saying that the terrible thing that happened to the Armenians in the last years of the Ottoman empire was not a genocide. In Turkey, you get prosecuted for saying it was. What is state-ordained truth in the Alps is state-ordained falsehood in Anatolia.

This week a group of historians and writers, of whom I am one, has pushed back against this dangerous nonsense. In what is being called the "Appel de Blois", published in Le Monde last weekend, we maintain that in a free country "it is not the business of any political authority to define historical truth and to restrict the liberty of the historian by penal sanctions". And we argue against the accumulation of so-called "memory laws". First signatories include historians such as Eric Hobsbawm, Jacques Le Goff and Heinrich August Winkler. It's no accident that this appeal originated in France, which has the most intense and tortuous recent experience with memory laws and prosecutions. It began uncontroversially in 1990, when denial of the Nazi Holocaust of the European Jews, along with other crimes against humanity defined by the 1945 Nuremberg tribunal, was made punishable by law in France - as it is in several other European countries. In 1995, the historian Bernard Lewis was convicted by a French court for arguing that, on the available evidence, what happened to the Armenians might not correctly be described as genocide according to the definition in international law.

A further law, passed in 2001, says the French Republic recognises slavery as a crime against humanity, and this must be given its "consequential place" in teaching and research. A group representing some overseas French citizens subsequently brought a case against the author of a study of the African slave trade, Olivier Pétré-Grenouilleau, on the charge of "denial of a crime against humanity". Meanwhile, yet another law was passed, from a very different point of view, prescribing that school curricula should recognise the "positive role" played by the French presence overseas, "especially in North Africa".

Fortunately, at this point a wave of indignation gave birth to a movement called Liberty for History (lph-asso.fr), led by the French historian Pierre Nora, which is also behind the Appel de Blois. The case against Pétré-Grenouilleau was dropped, and the "positive role" clause nullified. But it remains incredible that such a proposal ever made it to the statute book in one of the world's great democracies and homelands of historical scholarship.

This kind of nonsense is all the more dangerous when it comes wearing the mask of virtue. A perfect example is the recent attempt to enforce limits to the interpretation of history across the whole EU in the name of "combating racism and xenophobia". A proposed "framework decision" of the justice and home affairs council of the EU, initiated by the German justice minister Brigitte Zypries, suggests that in all EU member states "publicly condoning, denying or grossly trivialising crimes of genocide, crimes against humanity and war crimes" should be "punishable by criminal penalties of a maximum of at least between one and three years imprisonment".

Who will decide what historical events count as genocide, crimes against humanity or war crimes, and what constitutes "grossly trivialising" them?

International humanitarian law indicates some criteria, but exactly what events qualify is a matter of often heated dispute. The only cast-iron way to ensure EU-wide uniformity of treatment would be for the EU to agree a list - call it the Zypries List - of qualifying horrors. You can imagine the horse-trading behind closed doors in Brussels. (Polish official to French counterpart: "OK, we'll give you the Armenian genocide if you give us the Ukrainian famine.") Pure Gogol.

Since some countries with a strong free-speech tradition, including Britain, objected to Zypries' original draft, the proposed agreement now also says: "Member states may choose to punish only conduct which is either carried out in a manner likely to disturb public order or which is threatening, abusive or insulting." So in practice, individual countries will continue to do things their own way.

Despite its manifold flaws, this framework decision was approved by the European Parliament in November 2007, but it has not been brought back to the justice and home affairs council for final approval. I emailed the relevant representative of the current French presidency of the EU to ask why, and just received this cryptic but encouraging reply: "The FD 'Racism and xenophobia' is not ready for adoption, as it is suspended to some outstanding parliamentary reservations." Merci, madame liberté: that will do till the end of this year. Then let the Czech presidency of the EU, which covers the first half of next year, strike it down for good - with a dose of the Good Soldier Svejk's common sense about history.

Let me be clear. I believe it is very important that nations, states, peoples and other groups (not to mention individuals) should face up, solemnly and publicly, to the bad things done by them or in their name. The West German leader Willy Brandt falling silently to his knees in Warsaw before a monument to the victims and heroes of the Warsaw Ghetto is, for me, one of the noblest images of postwar European history. For people to face up to these things, they have to know about them in the first place. So these subjects must be taught in schools as well as publicly commemorated. But before they are taught, they must be researched. The evidence must be uncovered, checked and sifted, and various possible interpretations tested against it.

It's this process of historical research and debate that requires complete freedom - subject only to tightly drawn laws of libel and slander, designed to protect living persons but not governments, states or national pride (as in the notorious article 301 of the Turkish penal code). The historian's equivalent of a natural scientist's experiment is to test the evidence against all possible hypotheses, however extreme, and then submit what seems to him or her the most convincing interpretation for criticism by professional colleagues and for public debate. This is how we get as near as one ever can to truth about the past.

How, for example, do you refute the absurd conspiracy theory, which apparently still has some currency in parts of the Arab world, that "the Jews" were behind the September 11 2001 terrorist attacks on New York? By forbidding anyone from saying that, on pain of imprisonment? No. You refute it by refuting it. By mustering all the available evidence, in free and open debate. This is not just the best way to get at the facts; ultimately, it's the best way to combat racism and xenophobia too. So join us, please, to see off the nanny state and its memory police.