An attack in Belgium that left two police officers and a bystander dead was considered to be a “terrorist murder,” officials said Wednesday.

Benjamin Herman, 36, shouted “Allahu akbar,” the Arabic phrase for “God is great,” several times during the shooting spree Tuesday before he was fatally shot by a group of police officers, Wenke Roggen, the Belgian federal magistrate, said at a news conference.

The convict was a “soldier of the caliphate,” the Islamic State terror network said in a brief statement on the site of its Aamaq news agency.

belgium shooting1

The attacker was identified as Benjamin Herman. (AP)

Such wording is typical of the claims ISIS makes even when slaying suspects have not been linked directly to the terror group. Belgian officials have not said whether they had evidence the inmate had vowed allegiance to ISIS or was acting on its orders.

The attack was being treated as terrorism because of the way Herman acted during the shooting, Roggen said, adding that it resembled the Islamic State group’s calls to attack police with knives and steal their weapons, included the shouting of “Allahu akbar” and Herman was in contact with several radicalized individuals.

belgium shooting2

Officials said the attacker stabbed two officers before killing them with their own guns. (AP)

Belgian Prime Minister Charles Michel said Tuesday that Herman was indirectly mentioned in state security reports on radicalization before the attack. He said Herman appeared in security reports “in notes that did not primarily target him, but others or other situations.”

“Different services considered that, based on the elements they had, there was no reason to give him such a qualification,” Michel said, adding that the slayings will prompt, at least initially, “an investigation for terrorism.

Herman also killed another person the day before the attack, Belgian Interior Minister Jan Jambon said. Herman said the victim was a person with whom he spent time in prison.

Herman, a Belgian native, was an inmate who had been granted a few hours release Monday, but failed to return to prison. Local media reported that he was a known drug offender and may have been held in a prison with radicalized inmates.

Herman approached two police officers from behind carrying a knife and stabbed them several times in the city of Liege, city prosecutors’ spokesman Philippe Dulieu said.

belgium shooting3

Officials called the attack a "terrorist murder." (AP)

“He then took their weapons. He used the weapons on the officers, who died,” Dulieu told reporters.

Dulieu said the attacker shot dead a 22-year-old man in a vehicle that was leaving a parking lot outside a nearby high school. The attacker then took a woman hostage inside the school.

“Liege police intervened. He came out firing at police, wounding a number of them, notably in the legs. He was shot dead,” Dulieu said.

Liege Police Chief Christian Beaupere identified the two female police officers as 45-year-old Lucile Garcia and 53-year-old Soraya Belkacemi. He said Belkacemi was the mother of 13-year-old twin daughters who earlier lost their father, also a police officer.

Officials credited the female hostage the Herman took with calming him down and possibly preventing more deaths. Jambon, Michel and King Philippe visited the woman in the hospital.

“She was very courageous and perhaps, but this we will have to verify, she helped avoid more victims in the school,” Jambon said.

Officials concluded that there was no reason to raise the terror alert level because the attack was an isolated incident.

The Associated Press contributed to this report.