It was a Muslim policeman from a local police station who was “slaughtered like a dog” after heroically trying to stop two heavily armed killers from fleeing the Charlie Hebdo offices following the massacre.

Tributes to Ahmed Merabet poured in on Thursday after images of his murder at point blank range by a Kalashnikov-wielding masked terrorist circulated around the world.

Merabet, who according to officials was 40, was called to the scene while on patrol with a female colleague in the neighbourhood, just in time to see the black Citroën used by the two killers heading towards the boulevard from Charlie Hebdo.

“He was on foot, and came nose to nose with the terrorists. He pulled out his weapon. It was his job, it was his duty,” said Rocco Contento, a colleague who was a union representative at the central police station for Paris’s 11th arrondissement.

Video footage, which has now been pulled from the internet, showed the two gunmen get out of the car before one shot the policeman in the groin. As he falls to the pavement groaning in pain and holding up an arm as though to protect himself, the second gunman moves forward and asks the policeman: “Do you want to kill us?” Merabet replies: “Non, ç’est bon, chef” (“No, it’s OK mate”). The terrorist then shoots him in the head.

After the rise in online support for the satirical magazine, with the catchphrase “Je Suis Charlie,” many decided to honour Merabet, tweeting “Je Suis Ahmed”. One, @Aboujahjah, posted: “I am not Charlie, I am Ahmed the dead cop. Charlie ridiculed my faith and culture and I died defending his right to do so.”

Another policeman, 48-year-old Franck Brinsolaro, was killed moments earlier in the assault on Charlie Hebdo where he was responsible for the protection of its editor, Stéphane Charbonnier, one of the 11 killed in the building. A colleague said he “never had time” to pull his weapon.

Brinsolaro’s twin brother, Philippe – a senior police officer in the Marseille region – said on Thursday that all French people should unite to condemn the massacre. “The whole of France must mobilise against the horror that struck our country yesterday. You can’t attack freedom of expression, attack the authority of the state in this way,” he was quoted as telling reporters.

“Sometimes you get the feeling that the police are misunderstood by [French] people but it must not be forgotten that yesterday’s gesture shows that a policeman is ready to intervene at any time when he has to protect the nation.”

Franck Brinsolaro, also from Marseille, had recently married a journalist, Ingrid, who ran a weekly newspaper in Normandy. Her newspaper chain issued a statement saying that editors “will never yield to threats and intimidation of the untouchable principles of freedom of expression”.

But it was the image of Merabet’s killing on a Paris pavement that most shocked French police and the wider public.

French police unions, which carried the now-universal message of solidarity in support of Charlie Hebdo #jesuischarlie, posted on their websites and on Twitter black banners proclaiming #jesuispolicier in memory of their two dead colleagues.

Nicolas Comte, the deputy secretary general of Merabet’s union, Unité SGP Police, said colleagues had been “deeply affected by the video” and the assassination of the policeman “who was slaughtered like a dog”.

Flowers and messages of condolence were piled outside Merabet’s police station, in a side street which was blocked off by metal barriers on Thursday morning. Armed police stood guard on the street and there were further barricades outside the police station entrance.

Its telephone line played sombre music all day – an official day of mourning in France – and a policewoman said that Merabet’s colleagues were “very sad” at his passing.

Merabet had been a policeman for eight years and had just qualified to become a detective. Rocco Contento, who as Paris regional secretary of the union knew Merabet personally, spent time with him at a course at the end of the year. He described him as quiet and conscientious. His family came originally from Tunisia, he said.

Officials at the Bobigny business registry office said a person with the same name and age as Merabet ran a cleaning company between 2003 and 2006 in Livry-Gargan, a north-east Paris suburb where he went to school.

The headteacher at the local lycée, Marie-Pierre Pillet, confirmed he had been a pupil from 1989 to 1995, but nobody remembered him because of the 20-year time lapse.

Merabet was officially described as single, although he had a girlfriend, according to Contento.

“Now we’re on a war footing,” said the head of the union France Police, Michel Thooris. “They’re out there with AK47s, the weapons of war.”

On Thursday, a 25-year-old police officer, Clarissa Jean-Philippe, was killed in an attack in the south Paris suburb of Montrouge. The tragedy was not linked by her colleagues to the Charlie Hebdo atrocity. Thooris said that once the dust had settled and those responsible for both armed attacks were brought to justice, the police would be demanding action from the government.

“Now isn’t the time to criticise, but for decades there have been no-go zones in the council estates where there are arms caches and drug running,” he said. “We must terrorise the terrorists.”