A 24-year-old man faces four charges after a Calgary police officer shot a man during a machete attack at Marlborough Mall on the weekend.

The man has been charged with aggravated assault, assault of a peace officer, possession of a weapon dangerous to public peace and breach of a probation order.

The man also had two warrants for his arrest, police said.

He was shot after police were called to the Marlborough LRT about 2 p.m. Saturday for reports of a man fighting people and swinging a machete.

When police arrived, a man fled into a nearby Sears store, with an officer chasing on foot. Inside, the officer used a Taser, but it had no effect.

As the officer drew his gun, the man attacked, slashing him with a 48.3 centimetre machete.

The machete used in an attack on a Calgary police officer. (ASIRT handout)

The officer shot the man. Both were rushed to hospital, the officer suffering severe injuries and the man requiring emergency surgery.

Both are now in stable condition.

The Alberta Serious Incident Response Team (ASIRT) is investigating.

The 24-year-old is scheduled to appear in court Sept. 20.