Mankell, left; Krister Henriksson as the Swedish Wallander, top; Kenneth Branagh in the BBC version, above. Cato Lein/Writer Pictures
INSPECTOR KURT WALLANDER made his first appearance in 1991 in Faceless Killers, pursuing the murderers of an elderly farming couple in rural Sweden. Nearly 20 years and nine books later, his creator, Henning Mankell, swears he is poised to finish him off for good.
In the world of fictional detectives, Wallander is right up there with Ian Rankin's DI Rebus, selling tens of millions of copies world-wide and spawning three television series – the latest, starring Kenneth Branagh, is heading for its second season on the BBC.
But Mankell has not written a Wallander novel for ten years. The Troubled Man, published later this year in Sweden, marks his belated return to the redoubtable detective. "It's the last time," he says. "When you read it, you will understand. It doesn't mean that he dies – he doesn't die – but you will understand it's not possible to write any more about him."
Henning Mankell, 61, is appearing twice at the Edinburgh Book Festival. In the children's programme, he brings The Cat Who Loved Rain, the book he wrote for his grandchildren years ago which subsequently became an "astonishing success". He claims to be nervous of speaking to children, but doesn't sound too worried.
For adults, today's talk will ostensibly be about The Italian Shoes, a one-off novel published in Britain this spring, centred on a disgraced Swedish surgeon whose past returns to haunt him. But the audience, as he well knows, will have come to hear the man who created Wallander.
Mankell's introduction to detective fiction came as a child when his father, a judge who raised him alone after his mother left home, gave him a Sherlock Holmes book. "I can still remember. I was ill, and I was seven, and my father didn't want me to just read children's books. He came with Conan Doyle. I tried, and I liked it. I think the first I read was The Sign of the Four; Study in Scarlet was the next one. Then I guess I stayed home a few extra days from school to read.
"I must say that if you go to these old writers, if there's one who keeps up it's Sherlock Holmes. It's still possible to steal things from Conan Doyle, I can assure you." Mankell insists he has not done so, but adds: "I know a few who have. Just a few months ago I re-read stories that he wrote and some of them are very, very good."
Mankell divides his time between Sweden and Africa, where he has a busy life working with education and theatrical charities; he worked in theatre as an assistant director, and in 1985 he founded the Avenida Theatre in Maputo, Mozambique.
Perhaps as something of an outsider, he is choosy, even scornful, of modern writers in the detective genre. "I read Ian Rankin, whom I like very much," he says. "Le Carr, even though he doesn't write detective novels. Minette Walters. The American, Thomas Harris. But I'm not very much of a reader really, because I find much of it very bad, very uninteresting, very speculative."
Wallander's brand of crime may be less gritty and more conventional than that of David Simon, the other crime fiction international superstar at this year's festival and the creator of the gritty TV show The Wire. "Everyone knows my fiction is not factual," responds Mankell, who plans to take a look at The Wire this autumn. "But I would say that all the murders in Midsomer Murders are not very real either. I don't think this is very important really.
"I think everyone knows that, and I emphasise this always, that what I write is fiction. The difference is what I write could have happened. Many times I wrote things that later on happened. At least in three or four of the books I spoke about things that hadn't happened in Sweden before, but now it has."
The first book, Faceless Killers, he says, took up looking at asylum seekers a long way ahead of the rest of the crimewriting posse. The next, The Dogs From Riga, addressed "what the opening of the East would mean for a new type of criminality coming to Sweden. That was also completely new."
Henning Mankell's books are said to outsell Ian Rankin in America, and JK Rowling in Germany. Altogether, his series, standalone books and children's fiction have racked up sales of more than 30 million copies in 40 languages.
What's the secret of such massive appeal? First, perhaps,
a vividly realised sense of atmosphere. Then add a lonely protagonist who is struggling to rebuild a relationship with his daughter Linda, who attempted suicide as a teenager, but goes on throughout the series to become a detective herself, under the constantly worried eye of her father.
Wallander's family headaches give the detective yarn an enjoyably different and homely spin. Families did not intrude on the hard-boiled heroes of Raymond Chandler or Dashiell Hammett, or that resolute bachelor Sherlock Holmes, but the father-daughter dynamic is critical to Wallander.
"We spend a lot of life dealing with family," Mankell says. " I don't know how many years of my life I spent sitting in a car or whatever. I know for sure I spent a lot of time dealing with family matters. That's life, so why shouldn't it be in the book?"
In the small town of Ystad, along with tourists looking for the home of the fictional detective, two camera crews have been at work recently, for a new Swedish series of Wallander, and the British one starring Kenneth Branagh. "Sooner or later they will end up meeting," he says. "There is a hell of a lot of Wallander around. I can't keep in touch with everything."
Branagh as Wallander has won a Bafta, and is now up for an Emmy after the series began airing in the US. The British actor and production team opted for a brooding, battered Wallander with bloodshot eyes who seems to be barely holding on to life by his fingernails; you sometimes wonder how such a man could run a police department. The dialogue and the mechanics of crime-solving are stripped down to something almost surreal.
The Wallander of the Swedish TV series, Krister Henriksson, is an altogether more orderly, understated Scandinavian character. The episodes are plotted by Mankell but written by others; the dialogue is fuller and more chatty. Both have been airing on the BBC and not everyone is convinced that Branagh's is better.
Nine novels were adapted for Swedish TV starring another actor, Rolf Lassgard. "The two Swedish actors that have done it, I appointed those," says Mankell, who also met Branagh frequently. "All of these three guys, including Branagh, have done something very personal, but they are very, very specific kinds of actors: they go their own ways.
"Rolf maybe did more of an emotional policeman, reacting emotionally to everything, while Henriksson is organised and Branagh is dark." He praises Branagh's production team because "they have purified the story, to be almost like a classical fate drama, and that I really, really liked."
The final Wallander novel, The Troubled Man, will highlight his family even more, Mankell promises. Already acquired by British publisher Harvill Secker, and sold to ten other countries, the book opens when Hkan von Enke, a retired high-ranking naval officer, disappears during his daily morning walk in the forest near Stockholm. Von Enke is the father-in-law of Wallander's daughter Linda, who is expecting their grandchild. The story ranges back to the early 1980s, and Cold War rows when Russian submarines probed Swedish waters.
Mankell's previous foray into Wallander was ten years ago with The Pyramid, a series of short stories on Wallander's days as a 21-year-old patrolman facing his first investigation.
For the first time, he says, in The Troubled Man he is really confronting Wallander himself, rather than his detective work. "When I finally decided that there was one more book to write, I thought about it and realised that I had never written a book about him, himself … At the end Wallander realises that during his life he really hasn't understood much about the political circumstances in which he lived.
"Ten years ago, I thought I had finished. But after about four or five years I thought maybe there was some story missing about himself, in a way. After five more years I suddenly realised I had written the story. Now it is no more, and I have already forgotten him."
• Henning Mankell is at the Edinburgh International Book Festival this morning and (for children) tomorrow lunchtime.