Swiss police say a 24-year-old man who shot three people at a mosque in Zurich last night had committed suicide with the same gun.
They also said he was believed to have stabbed a man, described as an 'acquaintance' in the city on Sunday.
Zurich's Chief Of Police, Christine Lentjes Meili, said the man had taken an interest in occult sciences and may have been mentally ill. He had quit his job in a shop on Friday.
The gunman, who was Swiss, had stormed into the Islamic centre, used by the city's Somali community, and opened fire on worshippers.
Two of the three victims - men, aged 30, 35 and 56 - were seriously injured in the attack, which took around 5.30pm local time.
The third man suffered less severe injuries but all three are in hospital.
Ms Meili said there was no indication the attacker had any links with ISIS or any far-right organisation and nor was there any link with events in Berlin last night.
She said the gunman had been identified because his DNA was in the police database because he had committed several petty crimes in the past.
Zurich cantonal police said the suspect - whose body was found near the Gessnerbruecke bridge - had been identified and details would be given out at a press conference later today.
The police said: 'The dead man found around 300 metres from the scene of the crime after the shooting in the mosque is the suspect.'
Photographs showed police covering up the man's body. A gun and bloodstains beside the body suggest he may have shot himself, possibly as police closed in.
Police said the suspect was a man aged around 30 and wearing dark clothing and a dark woollen cap. He fled the mosque after the attack, near the city's railway station.
It was not immediately clear whether xenophobia or Islamophobia were the gunman's motivation.
Switzerland is home to around 4,000 Somali asylum seekers, who have fled violence and civil war in their homeland.
A police statement said the gunman had fired several shots at worshippers in the prayer hall at about 5.30pm local time.
It was reported there were about a dozen people at prayer at the time, and the injured men were then found in the street.
The worshippers were mainly from Somalia and Eritrea, and elsewhere in northern Africa, the ATS news agency reported.
The centre is registered as an association enabling Muslims to practise their religion, particularly through instruction on Islamic beliefs and teachings, as well as providing for the preservation of Islamic cultural values and scientific seminars, according to Swiss business website Moneyhouse.
Two-thirds of Switzerland's 8.3 million residents identify as Christian but its Muslim population has risen to five percent, particularly with the arrival of immigrants from the former Yugoslavia.
In 2009, a nationwide vote backed a constitutional ban on new minarets.
A number of mosques, including one near Zurich and the main mosque in Geneva, have in recent months been accused in media of allowing or encouraging the radicalisation of their worshippers, especially the younger members of their congregations.
Attacks by gunmen are rare in Switzerland but the country was shaken in 2013 by at least two multiple-fatality shootings.
It has a long-standing tradition for men to keep their rifles after completing compulsory military service – which partly explains a high rate of gun ownership in the country.