A gunman who wounded three people attending prayers at an Islamic center in Zurich has been found dead, apparently after committing suicide, the Swiss police said on Tuesday.
Officials described the man as a 24-year-old Swiss citizen of Ghanaian descent, but they did not identify him by name.
They said that he had no known links to terrorist groups, but that he was already wanted for the fatal stabbing of a friend whose body was found on Sunday at a playground in Zurich.
“We don’t believe it was a terror act,” Christiane Lentjes Meili, the chief of police for the canton of Zurich, said of the attack on Monday. “We have no evidence of a connection to terrorism.”
Three men were wounded in the attack, two of them seriously; all are in stable condition.
The attack occurred around 5 p.m. at a prayer center used mostly by Somali and Eritrean refugees, just south of the city’s main train station. Hours after the attack, the police found the body of a man on the Gessner Bridge, near the city center and a short walk from the Islamic center.
Witnesses to the attack reported that the gunman, dressed in dark clothes and a woolen cap, had escaped on foot. The police in Zurich, the largest city in Switzerland, used tracker-dog units to hunt the gunman.
On Tuesday morning, Peat Jost, a spokesman for the Zurich police, confirmed in a phone interview that the gunman was the man whose body had been found. “Our investigation says the dead man is the shooter,” he said.
The Islamic center, on a quiet side street near a fashionable shopping district, was closed Tuesday evening. Its blue front door was locked and the windows were barred, though on the second floor there were lights on.
Tokens of sympathy and solidarity had been left at the doorstep: a bunch of lilies, some roses, two lit candles. Someone had posted a handmade sign next to the door that said in German, “Love is the answer to hate.”
A gray-haired woman who gave her name only as Ursula stopped to leave a book wrapped in brown paper. She said she was a Christian and was sorry about what had happened at the center, and was praying for the victims.
Another visitor was Abdulahi Mohamud Qalimow, who moved to Switzerland from Somalia in 1995 and is now a Swiss citizen. He said he saw no evidence of the prejudices that Muslims sometimes encountered in other cities.
“We have no problem here,” he said. “We Swiss are multiracial, multicolor, multireligious.”
Mr. Qalimow said he knew people who went to the center, and he called it a place of teaching and prayer, with programs like Somali-language lessons for children of immigrants.
Bashir Gobdon, who identified himself as the leader of the Somali diaspora living in Switzerland, said that he attended the center twice weekly and that it had not experienced any previous trouble.
Mr. Gobdon said that there were about 700 or 800 people of Somali heritage in Switzerland, and that they were generally very well integrated, with about 40 percent of them holding Swiss citizenship.
He said he hoped the attacker would not turn out to have had any connection with racist or anti-Muslim groups. “We’re unlucky that this happened in Zurich, the best city in the world,” he said.
The shooting came as Germany was reeling from an attack on Monday in Berlin, where a truck rammed into a Christmas market and killed 12 people. “We must assume at the current time that it was a terrorist attack,” Chancellor Angela Merkel said on Tuesday.
The stabbing victim, a 25-year-old Swiss citizen of South American origin, and the assailant were acquaintances, but they had a falling out several months ago, the police said. The assailant was identified based on DNA found at the scene of the stabbing, and the police had already begun an intensive search for him before the shooting on Monday.
Police officers said that evidence in the assailant’s apartment suggested that he had an interest in the occult, but that the motive for the shootings was unclear.
Ms. Meili said she could not confirm reports that, before opening fire, the assailant had shouted for the worshipers to go back to where they came from.
The victims were from Somalia or Eritrea, Ms. Meili said, adding that she did not have precise information about each one.
The attacker, who recently quit a job at a local store, had been arrested as a teenager for bicycle theft but had no other police record, Ms. Meili said.