In a village in Slovakia, he found the cemetery had been targeted by anti-semitic vandals who dug up his great-grandfather's remains to steal gold from teeth and rings. He described the act as 'a desecration' and 'a kind of blasphemy', which had made him re-examine his views on whether the law should recognise blasphemy as a crime.

Fry was speaking at a debate with the journalist Christopher Hitchens at The Guardian Hay Festival last week. Among the issues raised was the government's proposed Incitement to Religious Hatred Bill, which has been criticised by civil liberties campaigners and comedians, including Fry's friend Rowan Atkinson, who warned that it could be used to ban jokes poking fun at Islam, Judaism or the Christian church.

Fry, whose films include Gosford Park and The Hitchhiker's Guide to the Galaxy, admitted: 'I'd never believed that there was any problem with blasphemy; it was an obvious nonsense to have a law suggesting that blasphemy be a crime. It's often an offence against good taste, it's often unkind, as so many things humans do are, but we don't necessarily have to make them outlawed.

'But I was doing a BBC programme a couple of weeks ago in a small village south of Bratislava. I was in search of my mother's grandparents and managed to track down a Jewish graveyard... surrounded by concrete walls and somewhere apparently my great-grandfather was buried there.

'All the graves were broken and destroyed, and it was a ruinous thing. The bodies had been disinterred. I discovered they'd been disinterred for two reasons: one was simple anti-semitism, the other simple greed, trying to get gold from teeth and rings. This had happened within the last five years: not a Nazi crime but a recent crime.

'A part of me then, eventually finding my great-grandfather's broken grave, did think: this is a desecration. If this happened in Britain this would be covered by laws of racial cruelty or so on. It's also a kind of blasphemy against something more than the Jewish faith though. It made me question whether I really was quite so sure that blasphemy was an old-time law for an old-time statute book.'

Fry went to Slovakia for a new series of the BBC's Who Do You Think You Are?, in which celebrities go in search of their roots. He wrote briefly about his Jewish heritage in his 1997 autobiography, Moab is My Washpot. His mother's great-grandfather, a Hungarian Jew named Neumann, lived for a time in Vienna 'and it was always said of him that he was the kind of man to give you the coat off his back'.

Fry wrote that his 'blood ran cold' when one day, reading about Hitler, he came upon this passage: 'He [Hitler] wore an ancient black overcoat, which had been given him by an old-clothes dealer in the hostel, a Hungarian Jew named Neumann, and which reached down to his knees... Neumann... who had befriended him, was offended by the violence of his anti-semitism.'

Fry added in his autobiography: 'I suppose there were many Hungarian Jews in Vienna in 1910, and I suppose many of them were called Neumann, but one can't help wondering if it really might be true that one's great-grandfather might have befriended and kept warm a man who would decimate a large part of his family and some six million of his people.'

During the debate in Hay-on-Wye, Fry described his own religious history: 'When I was about 13 I became enraptured by the Anglican church. I was born technically - if one can be technically - a Jew: that's what I am, because my mother is all Jewess, with Jewish parents as far as one can tell, and certainly grandparents.

'I wasn't brought up in the Jewish faith. I was brought up in no faith at all. My father's a physicist, but not an angrily atheistical one. I became enraptured by the Anglican communion, as we used to call it, and also by the English mystics... I don't know why, I can't explain it: I was a child of fads. But simultaneously I managed to immerse myself in Wagner and PG Wodehouse and Sherlock Holmes - there is no special pattern that I can discern.

'I've always believed that everything that is said from authority is either the authority of one's own heart, one's own brain, one's own reading, one's own trust, but not the authority of someone who claims it because they're speaking for God and they know the truth because it's written in a book. That, essentially, is where I come from. In a sense, tolerance is my religion. Reason is my religion.'

The Incitement to Religious Hatred Bill was announced in the Queen's Speech last month. Under the proposals, it would become a criminal offence to use threatening, abusive or insulting words or behaviour if one 'intends to stir up religious hatred' or if their conduct is 'likely to stir up' religious hatred. Prosecutions could be brought only by the Attorney-General and a convicted person would face up to seven years in prison.

Fry refused to go as far as Hitchens in combatively denouncing the bill, but made clear he 'couldn't possibly obey a law' that allowed prosecutions of comedians or writers who caused offence.

He said: 'It's now very common to hear people say, "I'm rather offended by that", as if that gives them certain rights. It's no more than a whine. It has no meaning, it has no purpose, it has no reason to be respected as a phrase. "I'm offended by that." Well, so fucking what?'