Basil Rathbone resented being typecast as Sherlock Holmes after playing the detective in 1940s films. Even his family thought he had been a fine thespian until he pulled on the deerstalker.

“When you become the character you portray, it’s the end of your career as an actor,” he said. But Rathbone has now been pressed back into Holmesian service from an unexpected quarter.

Modern fans of the quintessentially British detective associate him with Benedict Cumberbatch, who played him in the BBC’s Sherlock. But the best-selling Spanish author Arturo Pérez-Reverte hopes to revive Rathbone’s credentials with his new novel, a murder-mystery homage to Arthur Conan Doyle as well as Rathbone, whose reputation he says deserves to be revived.

Having been brought up on Conan Doyle’s books and Rathbone’s portrayals of Holmes, Pérez-Reverte, 72, wanted his novel to recover the serenity of a “lost England” and a literary genre “now swamped with blood and violence”.

The writer, who is most famous for the swashbuckling Captain Alatriste, said that while researching the novel El Problema Final he became intrigued with the life of Rathbone, its main character.

“I chose Rathbone as the leading character because when I close my eyes he is the canonical image of the detective. I admired his elegance,” Pérez-Reverte said. “But studying him I discovered that he was also a war hero and an accomplished fencer.”

Rathbone, who was twice the British Army fencing champion, was awarded the Military Cross for his actions during the First World War. He scouted enemy positions during daylight, which he later lightly dismissed. “All I did, old man, was disguise myself as a tree — that’s correct, a tree — and cross no man’s land to gather a bit of information from the German lines. I have not since been called upon to play a tree,” he once said.

Best-selling Spanish author Arturo Pérez-Reverte’s novel depicts Basil Rathbone as a retired actor holidaying in a hotel on a Greek island in the 1960s.

“He fought for his country and that for me bestows him a great merit,” said Pérez-Reverte, a former war correspondent. “He is a very sympathetic character. He was also an extraordinary actor. Apart from playing Sherlock Holmes he had great roles, for example, in Captain Blood alongside Errol Flynn and as the husband of Anna Karenina.”

“When you become the character you portray, it’s the end of your career as an actor.”

Pérez-Reverte’s novel depicts Rathbone as a retired actor holidaying in a hotel on a Greek island in the 1960s. He said: “The simple paradox is that an actor who plays a detective is obliged to play the role in real life. In the novel he is called Ormond Basil, so that I have a certain freedom. Everyone knows it’s him but there is an artistic distance. Some anecdotes are from his life, others I make up. I mix fact and fiction, erasing the frontiers between reality and fiction.”

Calling the novel “a personal exercise in nostalgia”, Pérez-Reverte recalled childhood discussions with his family about the mysteries in the works of GK Chesterton, Agatha Christie and Conan Doyle. “Conan Doyle created one of the great immortal characters in the history of literature alongside Don Quixote and The Three Musketeers,” he said.

“I went to the cinema and saw all the black-and-white Sherlock Holmes films starring Basil Rathbone and Nigel Bruce as Dr Watson,” he added. “There have since been great Holmeses like Benedict Cumberbatch and Jeremy Brett, but for me the image engraved in my mind of Holmes is Basil Rathbone.”

El Problema Final (The Final Problem), by Arturo Pérez-Reverte, is out now from Alfaguara

Isambard Wilkinson is the Spain correspondent for The Times of London