Author Judith Kerr is famous for her children's books, but behind the sweetness of works such as The Tiger Who Came To Tea lies a past set against the horror of Nazi Germany.

"Once there was a little girl called Sophie, and she was having tea with her mummy in the kitchen. Suddenly there was a ring at the door. Sophie's mummy said, 'I wonder who that could be?'"

For many parents, the opening lines of The Tiger Who Came to Tea are very familiar.

The work, published in 1968, has been read by several generations and tells the story of a tiger who invites himself to tea and eats and drinks all the food and water in Sophie's house. He then leaves, never to return.

Find out more Judith Kerr meets Alan Yentob in Imagine... Hitler, the Tiger and Me broadcast on Tuesday 26 November at 22:35 GMT on BBC One Or catch up later on BBC iPlayer

"It was just a bedtime story I made up for my daughter when she was two, getting on for three," says Kerr, who also wrote and illustrated the Mog series of picture books.

"I knew it by heart, every word. It hadn't changed because you watch your child's face and obviously you leave out bits gradually if they look bored.

"I told it to her again and again and again, and she used to say, 'Talk the tiger'."

Kerr, who turned 90 this year, loved visiting the zoo with her daughter Tacy, and particularly liked looking at the "beautiful" tigers.

"When I decided to do the book, I remember wondering what the tiger should look like, whether he should have clothes."

Kerr grew up in a loving family in pre-World War Two Berlin. Her mother Julia was a composer and her father, Alfred Kerr, a Jewish intellectual and theatre critic. They realised the impending threat from Hitler and Nazi Germany, and publicly criticised the regime.

Selection of Judith Kerr's other work Mog the Forgetful Cat

My Henry

When Hitler Stole Pink Rabbit

The Other Way Round

A Small Person Far Away

Bombs on Aunt Dainty

Creatures BBC History: Hitler's rise World War Two: The key events

"These Jewish intellectuals like Alfred Kerr, they immediately understood that this was an attack on the whole [of] humanity, not only on themselves," says German theatre critic Peter von Becker.

"They were, in a way, followers of the great poet Heinrich Heine who said, 'When there are books to be burned, human beings will be burned afterwards', and of course Alfred Kerr's books were burned in 1933 in the Opernplatz, which Goebbels directed."

By 1932 Alfred Kerr was on a Nazi death list and time was running out for the family.

"He'd been warned by somebody he'd never met, a policeman, that they were trying to take his passport away.

Image caption Books written by authors that did not conform to Nazi ideology were burned in the Opernplatz, Berlin in 1933

"I couldn't understand where he'd gone overnight. He wanted us all out of Germany before the elections because he thought they'd hang on to us to get him back," says Judith Kerr.

Alfred Kerr had left for Prague. His wife and their two children, Michael and Judith, fled the family home soon after, on the same day Hitler took power in 1933.

Image caption Julia, Alfred, Michael and Judith Kerr c1926

They were to meet their father in Zurich, but aged just nine at the time, Kerr did not understand how secret their escape was meant to be.

"My mother said, 'When we get to the frontier and the man comes to look at our passports, I want both of you to be absolutely silent. You're not to say a word'.

"So when we got to the frontier, a man came and looked at all the passports. As he went out, I was going to say, 'There you are, nothing's happened' and my mother just gave me a terrible look and so I stopped. I think now what I might have done to my family," says Kerr.

With the family reunited in Switzerland, they became refugees with little money and travelled first to Paris. After being refused entry to America, they journeyed to London in 1936, where they lived throughout the Blitz.

"We got bombed out, it was a hard time, but it wasn't easy for anybody. I was hugely struck by the generosity and kindness and tolerance of people during the war.

"My parents still spoke with a German accent. But there we were in the Blitz, people being killed every night, and nobody ever said anything nasty to them. I couldn't wait after the war to become British and belong here."

Media playback is unsupported on your device Media caption Judith Kerr revisits the childhood home in Berlin she was forced to flee

In 1940, with the Germans advancing into Dunkirk, Kerr's family feared the worst and were preparing for a Nazi invasion.

"My father would have had very special treatment by the Nazis, so a doctor friend of ours gave them suicide pills, and I said, 'What about me?' They said, 'Well, you speak perfect English, you may be able to survive'."

When the war was finally over, Kerr was awarded a scholarship to the Central School of Arts and Crafts in 1945. She later married scriptwriter Nigel Kneale and had two children.

As soon as they moved into a house with a garden, she immediately bought a cat, something she had always wanted as a child but could not have without a permanent home.

The war, however, had a devastating impact on her parents' lives. Her father was welcomed back to Germany as a hero in 1948, but on the night he arrived, he suffered a stroke. With the help of his wife, he took his own life.

Kerr says she looks back on his life with pride.

"I was very lucky to have him and he had a great talent for happiness. It must have been incredibly hard for him and he just found things to enjoy and he loved the world."

She later wrote a semi-autobiographical story called When Hitler Stole Pink Rabbit about her experiences of Nazi Germany. It is now used as a set text in German schools.

Fellow children's author Michael Rosen says metaphorically the tiger in Kerr's children's book could be interpreted as a vision from her past - an underlying threat, robbing the family of everything they own and disrupting the comforting routine of a young child's daily life.

"Judith knows about dangerous people who come to your house and take people away. She was told as a young child that her father could be grabbed at any moment by either the Gestapo or the SS - he was in great danger.

"So I don't know whether Judith did it consciously or not - I wouldn't want to go there - but the point is he's a jokey tiger, but he is a tiger," says Rosen.

Whether or not there are subconscious overtones in The Tiger Who Came to Tea, the book has never been out of print since it was first published. And yet Kerr is modest about whether her work will continue to be a favourite with future generations.

"I can't take it for granted, they may just get bored with it, but it would be wonderful if it lasted."

Images from The Tiger Who Came to Tea courtesy of Judith Kerr/HarperCollins Children's Books

Judith Kerr's story is told in Imagine... Hitler, the Tiger and Me broadcast on Tuesday 26 November at 22:35 GMT on BBC One. Or catch up later on BBC iPlayer

Follow @BBCNewsMagazine on Twitter and on Facebook