The suspected gunman of the shooting in Halle, Germany, was detained, the police said.

After minutes of stillness punctuated by clicks and muttering, the camera pitches up and shows the close-shaved, youthful face of a man looking into the lens.

On Wednesday in the east German city of Halle, the man before the camera is preparing to commit a violent assault against a synagogue that will devolve into a random, blundering search for fresh targets.

The shooter's technique recalls the self-presentation of the man who killed 51 and wounded dozens at a mosque in Christchurch, New Zealand, in March.

In a heavy German accent, he hurriedly babbles a brief anti-Semitic diatribe blaming Jews for being "at the root of problems" in Western societies.

Then the shooter readies an apparently home-made shotgun before driving the short distance to the synagogue, blasting hip-hop over a bluetooth speaker.

"I'm an... idiot"

Parking in the leafy street by the high brick wall of the Jewish cemetery, the man who introduced himself as "Anon" is discouraged when he sees the massive wooden synagogue doors bolted shut.

When he fails to barge open smaller entrances, he lights the fuse of a home-made bomb and hurls it over the wall.

A shocked old man in a cap hurriedly turns his bicycle away as the shooter walks from the explosion.

After the door resists another bomb, a 50-something woman in a pink shirt, light scarf and glasses walks by, grumbling at the bizarrely-dressed attacker but apparently almost unfazed.

He levels an automatic weapon and fires a short burst into her back.

Further efforts to force the door prove useless, and after pitching more bombs and a molotov cocktail over the wall, he fires another, longer burst into the lifeless body of the woman lying by his car.

"Pig!" he shouts, before realising he has punctured a tyre.

The automatic weapon lets the killer down when a man stops his van soon after to check on the dead woman.

Attempting to fire a new burst, the gun only clicks and he fumbles to change the magazine.

When the frightened passer-by has driven off, attempts to blast the lock off the synagogue door with a shotgun are equally unsuccessful.

"Sorry guys. I'm an ... idiot. I can't kill shit," he tells his imagined viewers in English as he drives away.

Inside the synagogue, worshippers have watched the attacker's attempts to penetrate the building on the security cameras.

"We barricaded our doors from inside and waited for the police," Jewish community leader Max Privorotzki told Stuttgarter Zeitung.

"In between, we carried on with our service."

"Really calm, like a professional"

A few streets away, the gunman spots a kebab shop and pulls up, grabbing his cobbled-together arsenal.

"Doener. That'll do," he says under his breath.

He tosses one of the bombs inside, firing a final burst with the automatic before it jams for good.

But his arrival is enough to scare patrons and the owner, and several men flee from the plush red-upholstered benches into the depths of the store.

"He was really calm, like a professional. Perhaps he's done something like this several times," proprietor Rifat Tekin, who escaped by ducking behind the salad counter, later told broadcaster NTV.

From the shooter's perspective, there is more wrestling with weapons and cursing as he attempts to harm the men cowering at the back of the shop, who are pleading for their lives.

Cartridges rattle onto the floor from his seemingly inept fingers.

After briefly stepping outside and scaring pedestrians, he returns to the shop where he executes one of the men at point-blank range with two shotgun blasts, cutting off his cry of "No!".

"At least I've demonstrated how useless improvised weapons are," he mutters to himself and the camera on his way out, a lone bottle of cola somehow still standing on one table, another toppled next to an abandoned meal and a pair of glasses at the next.

The police cut off his first attempt at escape in the car, and he exchanges fire with them before falling to the ground for several seconds, struck by a bullet as he attempted to drive off.

"I'm bleeding, I've been shot in the neck," he says once he is underway again, groaning with pain and grimacing in the moments his face is visible.

He turns the car radio on over hectic, cartoonish music from his bluetooth speaker, but the presenters are discussing the US-China trade war rather than his failed onslaught.

"Sorry guys, that was it. A total loser..." the killer says, before tossing the still-broadcasting smartphone out of the window.