A police officer called to a shop cash machine raid was hit with a sledgehammer after thieves smashed his car window.
The 41-year-old was hit on the head and arm, leaving him with a badly-swollen face, cuts and bruises, West Midlands Police said.
The officer and a colleague were responding to reports of a burglary at a Tesco Express store in Hamstead, Sandwell, in the West Midlands.
Police said one of a three-strong gang - all with faces covered and wearing dark clothes - targeted the officers, and "as the window of his police car was smashed, the officer was struck".
The group fled empty-handed in what officers described as a dark-coloured, high-powered, Audi A6 estate car, on false number plates.
The gang left tools behind, which are now being studied, along with CCTV of the incident.
Police appealed for witnesses as it emerged the getaway car's boot was still wide open as it sped off - a detail detectives think might prompt potential witnesses to recall the vehicle and where they saw it.
The injured officer was taken to hospital but was discharged after treatment.
Nobody else was hurt. The Hamstead Road store was closed at the time.
Chief Inspector Harvi Khatkar, of West Midlands Police, said: "Day in, day out, our officers put their safety on the line to protect the public from some exceptionally dangerous criminals."
She called for the public's help in tracking down the "desperate thieves".
Anyone with information is urged to call 101 or contact Crimestoppers anonymously on 0800 555111.