Spanish psychological thriller Dictado (Childish Games), depicting a man spooked by a little girl who revives a dark secret from his childhood, had viewers also on edge at its premiere at the Berlin Film Festival on Saturday.

When Daniel's childhood friend commits suicide, he takes the man's seven-year-old daughter into his care. But some of the girl's simplest actions put him on edge as they recall ominous childhood memories.

My character is afraid of a descent into madness because of the ghosts of the past, said Juan Diego Botto, who plays Daniel. He is making a huge effort to save himself, to remain healthy...but he cannot avoid the fact this trauma, that he never confronted, fully comes back in a monstrous form.

Daniel is a gentle schoolteacher, in a loving relationship with Laura, played by Barbara Lennie who recently starred in Pedro Almodovar's La piel que habito (The skin I live in).

But like his friend, he is increasingly engulfed by irrational fears and memories of the past. During the day, he manages to repress his demons and carry on as usual, but at night they come back with a vengeance in his macabre dreams.

It is about the shadows our childhood project across our lives, from which we are never freed, said director Antonio Chavarrias. The nightmares help to show what is going on inside him and the irrational elements of his feelings.

He is a perfectly balanced character, or thinks he is. He thinks he has a logical explanation for what has happened in his childhood, he has been convinced it was an accident which has no further consequences, but when he sleeps he loses that control.

The symphonic music, which recalls the scores of classic American thrillers from the 1940s and 1950s, such as those of Alfred Hitchcock, heightens the tension and threat that ultimately engulfs Daniel. Certain motifs are repeated in many variations like a growing obsession.

An echoing melody can be pretty but also become very nightmarish, said Chavarrias, who filmed the main plot in his hometown of Barcelona, in northeastern Spain.

Juan's character is a very difficult one because... his life is undergoing terrible change, and he cannot express it fully, so we thought we could use the score to help channel those emotions.

Daniel's torment increasingly drives a wedge between him and his girlfriend, who desperately wants a child of her own and grows attached to the little girl. He becomes isolated, trapped within his own fears and jealousy.

The girl, played by Magica Perez, appears innocent but is somehow also unsettling.

Director Chavarrias said it was challenging to make a film about evil without any villains - and it is precisely that which makes it less easy to define as a genre.

I didn't want to make a genre film, but I looked to traditional fairytales, and also more specifically to the tragic dimension of fairytales, he said.

There is a lot of horror in fairytales, but at the end, there tends to be light at the end of the tunnel.