ZURICH—A 51-year-old Serb has admitted carrying out the fatal shooting of a man at a mosque in northeastern Switzerland, police said in a statement late Saturday.

The victim, a 51-year-old Swiss national of Albanian background, was shot several times in the prayer room of the El-Hidaje mosque in St. Gallen on Friday afternoon. The victim, who hasn't been named, died at the scene.

The...