Riding high on Locarno hit The Devil's Backbone, which is currently closing a deal for the last major territory, North America, with Sony Pictures Classics, Mexican horror maestro Guillermo del Toro hit the Edinburgh International Film Festival this week to discuss a genre most executives dismiss as "a secondary form of art".

Speaking at a festival master class, del Toro aims to disprove that assumption with Devil's Backbone, a low-cost Spanish-language film made after his experiences on his first big-budget US picture, Mimic. Alongside Spanish director Alejandro Amenabar's The Others, del Toro's story of a haunted schoolhouse for orphans of the Spanish civil war should provide a critic-friendly alternative to the glut of teen horrors when Optimum opens it in the UK next month.

It is a highly personal - though accessible - film about "war and its ghosts", full of the former Jesuit schoolboy's own spiritual angst. In a scene cut from the finished film because the director felt it was too didactic, the title is explained as a reference to spinabifida, a paralysing condition which, according to superstition, afflicts "children who shouldn't have been". As a boy, del Toro and his friends used to sneak off to the sewers or the morgue. "I saw a pile of foetuses this high," he says, raising his hand to about four feet. "When I saw that pile, I knew there was no God."

By his own admission, it was a very weird childhood. His grandmother used to put bottle caps inside his shoes to mortify the flesh. "She actually tried to exorcise me twice," he says. "If I had telekinetic powers, I tell you, I would be in jail."

In a key scene in the film, the 12 year-old protagonist Carlos explores the catacombs looking for a ghostly child whose amplified breath seems to fill the entire room. Del Toro's uncle, who used to take him to the cinema to see such wholesome fare as Taxi Driver and Raw Meat, told him that when he died he would come back to tell him "if there was something on the other side". Doing his homework in front of the TV one evening, he heard a breathing that seemed to be coming from right next to his ear.

Not that that was enough for this "disillusioned mystic" to make the leap of faith. "He should have been more specific. That sort of sex phone-call from the other side won't do."

Del Toro mortgaged his house and sold his car to make his debut, Cronos. It took him seven years of planning until he finally shot the vampire story in 1992, having set up a make-up company especially to learn the craft (he folded the company after making the film). He sold the film so cheaply that he was still paying off debts three years later. But it established him as a truly inventive horror director, as much in the gruesome Roger Corman mould as the more subdued, atmospheric approach of Devil's Backbone. In one scene, an apprentice vampire is reduced to licking up a pool of blood on the floor from someone's nosebleed. "I wanted true hunger," del Toro says. "I don't like winners, I like losers. When they look like Tom Cruise or Brad Pitt, it is so easy to suck somebody's blood."

There is a cathartic element to his work, he admits. Four years ago his father was kidnapped. He was re-writing The Count Of Monte Cristo, Dumas' tale of revenge after wrongful imprisonment, as a gothic western, and he kept on writing while his father was held for 72 days. "I used to think of therapy through art as bullshit. But I experienced an epiphany. I was able to write for my father and deal with the kidnappers."

His first outing in Hollywood, with Dimension Films' Mimic, was at best a compromise, at worst a war. "In any war, including a war for a movie, in the end no one wins. The film is something in the middle. It is made by me, but it is not what it could have been. It could have been far deeper'What it is, is a great big bug movie."

Del Toro has plenty of cautionary tales about dealing with Hollywood - he was offered Exorcist 4 for "fifteen minutes" with the caveat that the studio would prefer not to have an exorcism in the film. But it is too easy to see him as an artist frustrated by Hollywood. Now at least he accepts the discipline or compromise that comes with millions of dollars of someone else's money. He has been linked to comic book adaptation The Coffin, optioned by James Cameron's Lightstorm Entertainment. Saying he is happy with New Line Cinema's Blade 2, he warns that it is not a del Toro film, but Blade 2 directed by del Toro. "I loved Blade. There is the same kick-ass action, but there are some of my touches."

His aim is to alternate between big-budget spectaculars and independent films, working with Devil's Backbone collaborator Tequila Gang and trying to avoid the trap of getting used to the limos. But he has several intriguing personal projects that may need big budgets. His Count Of Monte Cristo is set in nineteenth century Mexico and, true-to-life, characters talk in French, Spanish and English. "I hate films where Mexicans talk like 'dees'," he says.

"It's a western with horror sensibilities," he says, describing a scene where the count is washed ashore at night, lightening strikes, and the audience sees the sea is full of skeletons.

Hellboy, meanwhile, is based on the comic strip about a 6 foot 5 demon who shaves off his horns and becomes a paranormal investigator for the US government. "Most Hollywood films are about demons learning that they are human. He learns that he is not a human, but that he is still a good guy."

Of course, if horror is seen as a second-class art, comics are literature's white trash. Universal suggested making Hellboy with wrestler The Rock. Del Toro suggested getting another wrestler, Billy Goldberg, to direct "Most film executives have never read a fucking comic," he says. "They think they are for retards."

Co-produced by the Almodovar brothers' Madrid-based production outfit El Deseo, Anhelo productions and London and Mexico City-based The Tequila Gang, The Devil's Backbone is sold by Wild Bunch in most territories. Latin America rights were handled by Good Machine and sold to Fox. The film is now largely sold out. Distributors include Kinowelt (Germany), Lantia (Italy), StudioCanal (France), Asmik Ace (Japan) and KN Culture (Korea). All rights deals have also been closed for Benelux, Greece, Turkey and Hong Kong.