LISBON, Portugal (AP) — A man wielding a large knife killed two women and injured several other people at an Ismaili Muslim center in Lisbon, and Portuguese police said they were investigating Tuesday's stabbing attack as a possible terror act.

The women were Portuguese staff members at the center, Ismaili community leader Narzim Ahmad told Portuguese TV channel SIC. Local Afghan community representatives and Portuguese authorities described the man as a refugee from Afghanistan who was receiving help from the Ismaili Community.

Officers dispatched to the center late Tuesday morning encountered a man armed with a knife, according to a police statement. The officers ordered him to surrender and he was shot when he advanced toward them, the statement said.

A suspect was in police custody at a Lisbon hospital. Investigators were looking into terrorism as a possible motive. Several other people were wounded, according to the statement, which provided no further details.

Millions of Afghans have fled violence and poverty in their country, often risking their lives to get to Europe.

The suspect is a “young man” who arrived in Portugal through a European Union program that transfers asylum-seekers to member countries to help relieve pressure on Mediterranean nations such as Greece and Italy, Portuguese Interior Minister José Luis Carneiro said.

While police told The Associated Press they were investigating the attack as a possible extremist act, Carneiro urged caution, saying any “hasty analysis” should be avoided.

The minister said the man's wife died in a refugee camp in Greece, leaving him to care alone for three children, ages 9, 7 and 4. Authorities had no information indicating he had been violent in the past, Carnieiro said.

“From what we know, he was a calm person who had received help from the Ismaili community in terms of knowledge of languages, knowledge, food care, care for younger children,” he said.

Omer Taeri, president of the Association of the Afghan Community in Portugal, told CNN Portugal the suspect arrived in the country last year. He said the alleged attacker suffered from “psychological trauma” after the death of his wife and was worried about his children.

Taeri asked for people to not “judge an entire community by one incident.”

Portuguese Prime Minister António Costa said police shot the suspect and told reporters the attack was “a criminal act.”

“Everything points to this being an isolated incident,” Costa said, without elaborating.

Armed police from a special operations unit could formed a perimeter outside the building following the incident.

The Shia Imami Ismaili Muslims, generally known as the Ismailis, belong to the Shia branch of Islam. The Ismaili Muslims are a culturally diverse community living in more than 25 countries around the world.

Portugal hasn't recorded any significant terror attacks in recent decades, and religious violence is virtually unheard of.

“The Ismaili community is shocked and saddened by this incident and is providing support to the families of the victims,” the Ismaili Community said in a statement. Neither police nor the community identified the women who died.

___

Joseph Wilson reported from Barcelona.

Copyright 2023 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.