For someone who professes to be into the new-fangled science of what makes people tick, I’m not sure it was the cleverest move to get into a rickety carriage on a fairground ferris wheel with a psychopathic killer. Still, the image of junior doctor Max Liebermann hanging from his fingertips over the city of Vienna after being hurled from the door, proved a thrilling, if completely avoidable – “hypnosis would be easier” – end to the first episode of Vienna Blood (BBC Two).

It is set in Vienna in 1906, where gruff detective Oskar Rheinhardt (Juergen Maurer) is told that a young doctor – Liebermann (Matthew Beard), a fan of Freud – will be shadowing him to learn about “the psychopathy of the criminal mind”. “Catchy,” deadpans Rheinhardt. The three-part series will be compared, unavoidably, to Sherlock: its writer, Steve Thompson, adapting the Frank Tallis novels, was also a Sherlock scriptwriter. But Liebermann’s character study of his reluctant new mentor is so Holmesian it feels like a spoof. For the first half an hour, it feels as if the makers are failing to repress their Sherlock complex – the jaunty camera angles, the hyperreal look, the jangly music – until it starts to relax into itself.

A medium has been murdered – a crime that has been made to look like suicide. Except, points out just about every character – as if we didn’t get the significance the first time – where is the weapon? Rheinhardt is, in the classic tradition, one of those troubled but maverick detectives with quirks – he munches coffee beans – and who needs a quick conviction. His relationship with Liebermann is predictably tricky at first, but it is nice to watch him thaw. “You’re staring,” says Rheinhardt. “I was told I could observe,” says the young doctor. The police officer is humble enough to value Liebermann’s talents for personality profiling, and asks for help. And hurrah, (possibly) TV’s first forensic psychologist is born.

Matthew Beard and Jessica de Gouw in Vienna Blood. Photograph: Production/BBC/MR Film/Endor

Liebermann is implausibly good at this: he points out that the woman’s apartment is “like a stage set” (they realise she holds seances), and is puzzled by the absence of clothes in her wardrobe, until he makes the giant leap that she must have been pregnant, her clothes all taken to be altered by a seamstress. “Welcome to the case, Inspector,” says the doctor. Goodness, he’s cocky, under that cool demeanour. Back to the morgue where his theory is confirmed. “Find the father of this child, he’s your killer,” he tells the experienced older detective, who inexplicably fails to thank him sarcastically for the suggestion.

Is the killer Otto Braun, one of the men they track down who attended the seance? There is a good rooftop chase that makes him look guilty. “Welcome to the case, doctor,” says Rheinhardt back to Liebermann, when they catch him. It is cheesy, but their relationship is developing so nicely I’ll let them off. But it’s not Braun – the killer is an adulterer with a reputation to lose, and anyway, Braun soon ends up dead.

The sleuths arrange another seance, presumably – though it’s not clear – to pretend to contact the dead medium, and flush out one of the other attendees, a wealthy banker, Heinrich Holderlein, whose wife makes him go to this sort of thing. It doesn’t work but he is questioned, until rich and powerful people conspire to put pressure on the police, and get Rheinhardt taken off the case.

As if that would work; Rheinhardt is dogged and anyway, he says, “work is all I have”. He deduces the murder weapon is an antique gun, stuffed with fragments of human bone instead of shot, so it leaves no trace (I still don’t understand why the killer thought this necessary) – and Liebermann figures the door was locked from the outside using steel forceps. Which makes them suspicious of the Vienna steel magnate and mayor’s right-hand man, Hans Brückmüller – as if he’s the only one in the city with access to such a device. But it must be him – the police commissioner was keeping the mayor’s office informed of the investigation, so Brückmüller was always a step ahead.

Invited anonymously by Liebermann to meet him at the fairground and ride the big wheel, Brückmüller is revealed not so much as a Moriarty mastermind but as a frighteningly recognisable trumped-up politician wanting to rid Vienna of “the vermin – the subversives, the intellectuals, the muck-raking journalists”. He spits contemptuously at Liebermann: “Dr Jew.” Still, Liebermann gets his confession, and stuffs a life-saving finger in Brückmüller’s fresh bullet wound.

It is all absurd but enjoyable, the extended length more or less justified by the subplots: the advent of a more humane treatment of mental health v the electroshocks championed by Liebermann’s arrogant professor; Viennese overt antisemitism and Liebermann’s father’s desperation to fit in; the difficulty of convicting powerful men who think they are untouchable. I take issue with the women depicted almost exclusively as beautiful corpses, vehicles for gratuitous breast shots, hysterics or needy girlfriends. And the odd-couple detective and sidekick setup feels tired. But Beard and Maurer are excellent, and my id is a sucker for a bit of murder in a fin de siècle setting, so I’ll forgive much.