He had defied repeated attempts to deport him and was still in Belgium because the country currently has no bilateral agreement with Algeria.
The 33 year old had twice been ordered to leave the country but this had never been implemented, the authorities confirmed on Tuesday.
Belgium's immigration minister Theo Francken also admitted that the man had not been placed in a detention centre for illegal immigrants "because of a lack of available places."
In the machete attack in Charleroi on Saturday, he injured two policewoman, one seriously. She was of Muslim origin.
Police say the man lived with his brother in a Charleroi suburb.
Belgian Prime Minister Charles Michel said the attack was deemed a case of "attempted terrorist murder."
A statement by the IS-affiliated Aamaq News Agency said it was in response to the "crusader coalition"'s military campaign against IS and its self-declared caliphate in Iraq and Syria.
Belgian police have demanded additional measures to protect police buildings and staff.
Charleroi Mayor Paul Magnette said Belgian authorities are now discussing whether security for police facilities and officers should be increased.
Khalid el-Bakraoui, one of the suicide bombers who detonated an explosive belt at a Belgian Metro station - killing 14 - is thought to have rented a flat at Charleroi which was used as a meeting place by the Belgian cell taking part in the Paris attacks.
Belgian police, meanwhile, are searching for a 15-year-old after a film of him calling for the murder of all Christians was posted on the internet. The film was shot in Verviers, scene of a successful anti-terrorism operation last year.
The video shows the teenager calling for the murder of all Christians. "Oh Allah, destroy the odious Christians. Oh Allah kill them all. Don't spare any of them", the boy is filmed saying in Arabic.
The boy has been identified and is on a list of radicalised persons.
The Liège newspaper La Meuse reported that he is the son of the radical imam El Alami Amaouch who faces deportation to the Netherlands.
Amaouch has duel Dutch-Moroccan nationality and is imam at a mosque in the village of Dison just outside Verviers.
The video appeared on a French website.
The Mayor of Verviers, Muriel Targnion, said she was taking the video seriously and has asked the police to trace the boy.