LISBON, Portugal (AP) - A man wielding a large knife killed two Portuguese women and wounded several other people at an Ismaili Muslim center in Lisbon on Tuesday, authorities said. Police said they were investigating the stabbings as a possible terror act.

Portuguese authorities described the man as a refugee from Afghanistan who was receiving help from the Ismaili Community. Local Afghan community representatives said the suspect was known to have psychological problems after his wife died while their family was at a refugee camp in Greece.

While police told The Associated Press they were investigating Tuesday's violence as a possible extremist act, Portuguese Interior Minister Jose Luis Carneiro publicly urged caution, saying any “hasty analysis” should be avoided.

The women who died were Portuguese staff members at the center, Ismaili community leader Narzim Ahmad told Portuguese TV channel SIC. Neither police nor the community identified the women who died.

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. 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.

Carneiro said that 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.

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, food care, care for younger children,” the minister 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 Antonio 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.

Joseph Wilson reported from Barcelona.