A machete-wielding man who attacked two policewomen in the southern Belgian city of Charleroi has died in hospital of police gunshot wounds, according to officials.

The police officers were attacked outside police headquarters in Charleroi, a city 50km south of the capital, Brussels, on Saturday afternoon. One suffered "deep wounds to the face" while the other was slightly injured, local media reported.

Charleroi police said on Twitter that the attacker, who was shot by a third officer, subsequently died of his wounds in hospital, while the two policewomen were out of danger. 

"The death of the machete attacker is confirmed," the tweet said. 

The assailant reportedly shouted "Allahu Akbar" (God is the greatest in Arabic) during the attack. 

Charles Michel, the Belgian prime minister, wrote on Twitter on Saturday that he "strongly" condemned the attack, while the country's Interior Minister Jan Jambon called it a "vile act".

"Initial indications clearly point towards terrorism," the prime minister later told the television channel RTL.

Public broadcaster VRT said the attacker had taken out a machete when two officers asked to search him at a checkpoint set up outside the city's police headquarters.

One young man told the television station VTM that he and his friends heard five to six shots fired in rapid succession, then, 30 seconds later, three more shots.

There was no immediate indication of the man's identity; Belgian media reported that the attacker had no papers with him.

A spokesman for the federal prosecutor said the authorities expected to be able to issue more information on Sunday morning.

Belgium has been on high-security alert for months since suicide bombers hit Brussels airport and a metro station near the European Union's institutions on March 22, killing 32 people.

Investigations say the country was also a springboard for the attacks carried out in Paris in November, which killed 130 people.

Source: Agencies