ZURICH, Switzerland — A gunman dressed in black who opened fire in the prayer hall of a mosque frequented by Somali immigrants was found dead around 300 yards away, police said early Tuesday.

Police officers secure the area in front of an Islamic center in Zurich, Switzerland, after a shooting on Monday. ENNIO LEANZA / EPA

Two people were seriously injured in the attack, which took place Monday night near the main train station in Switzerland's financial capital. A third victim sustained less severe injuries.

Zurich cantonal police said authorities had identified the suspect, but gave no further details.

Officials declined to comment on the potential motive.

"We never once had a problem," said Abukar Abshirow, a Somali who said he was a regular worshipper at the center that attracted Muslims from around the world. "We never had anyone come and say, 'Why are you here?' We never had that."

The victims were aged 30, 35 and 56. The scene is located in a central neighborhood known for trendy cafes and the city's red-light district.

Two-thirds of Switzerland's 8.3 million residents identify as Christian but the nation has been wrestling with the role of Islam as its Muslim population has risen to 5 percent, swelled by the arrival of immigrants from the former Yugoslavia.

In 2009, a nationwide vote backed a constitutional ban on new minarets.

Police said it was too early to determine whether there might be any link to an incident in Berlin on Monday, where a truck rammed into a Christmas market.

Attacks by gunmen are rare in Switzerland.

The country has a long-standing tradition for men to keep their military rifles after completing compulsory military service — which partly explains a high rate of gun ownership in the country.