Updated Aug. 7, 2016 11:20 a.m. ET
BRUSSELS—Belgian federal authorities have opened a terrorism probe following a weekend machete attack on two police officers in the city of Charleroi for which the extremist group Islamic State claimed responsibility.

The federal prosecutor’s office said Sunday the assailant was a 33-year-old Algerian man who had been living in Belgium since 2012. They said the man, who was shot during the attack on Saturday and later died, was known to police for common crimes but not for terror links. He was identified by the initials K.B.

Islamic State’s news agency Amaq on Sunday claimed the attack was carried out by one of the group’s “soldiers” in response to strikes by the U.S.-led coalition fighting against it in Iraq and Syria.

The attack is the latest in a series carried out or inspired by the Sunni Muslim extremist group that have left scores dead, in what Belgian Prime Minister Charles Michel said was a “new reality” in Europe.

In addition to orchestrating large-scale attacks, like those in Paris last November that killed 130 people, the group has also encouraged sympathizers to carry out lone-wolf attacks targeting civilians. The group regularly claims responsibility for attacks despite no concrete evidence of coordination with the assailants.

Mr. Michel said the federal prosecutors had opened a probe into “attempted terrorist murders.” The prosecutors said the investigative judge involved specialized in terrorism cases.

“The terrorist track is the possibility which is under analysis at this point,” he said, noting, however, that at this early stage it was important to be “extremely prudent” in drawing any conclusions.

Belgian authorities said the two police officers were out of danger. One had sustained serious face and neck injuries, the other was lightly injured.

Authorities said the general threat level was being kept at three, one notch below the maximum. Mr. Michel also said Belgian authorities would work with police unions to increase security for officers, who have been targeted in other recent terror incidents across Europe.

A Charleroi police spokesman told Belgian television and radio on Saturday that just before 4 p.m., an individual approached a checkpoint in front of the police headquarters where the two female officers were posted. He immediately took a machete out of a sports bag he was carrying and struck out violently toward the heads of the officers, shouting “Allahu akbar”—Arabic for “God is Great.” A third police officer who was close by shot the attacker, who died.

On Sunday, the prosecutors said they had found no explosives in the backpack carried by the man or any other weapon. They also said they had raided two locations in Charleroi.

Belgium has faced a string of terror attacks over the past two years. For most of the past few months, the threat level has been at three, meaning the risk of an attack was serious but not imminent.

On March 22, twin suicide attacks took place at the Brussels airport and a subway station that left 32 people dead.

Authorities have carried out raids in Charleroi, a city of around 200,000 people in the French speaking part of Belgium, in recent months and made some arrests.

Khalid el Barkaoui, a suicide bomber in the March Brussels attacks who was wanted in connection with the November Paris attacks, was suspected of using falsified documents to rent a house in Charleroi that may have served as a base for the Paris terrorists, authorities said in March. Police had raided the house in December.

Belgian authorities put hundreds of soldiers on the streets after the Paris attacks but they are concentrated in Brussels and other big cities.

Some of Europe’s recent terror attacks have been carried out away from the more heavily guarded capitals—including the July 14 attack in Nice, in southern France.

Asked whether he was concerned the terror threat was growing outside of Brussels, Mr. Michel acknowledged that the concentration of forces in the capital may displace the security threat elsewhere. He said authorities are constantly reviewing defensive measures.

—Noam Raydan contributed to this article.

Write to Laurence Norman at [email protected]