Prosecutors said several others among those arrested were already known to authorities for their connections to the radical An'Nur mosque in Winterthur in Zurich canton, which was closed in 2017.
Swiss police arrested six people and closed a mosque on Monday over alleged support for the so-called Islamic State (IS) group and Al-Qaeda, authorities said.
The office of Switzerland's attorney general (OAG) said national and regional police forces had carried out "19 searches near a mosque in Neuhausen and arrested six people" in the northern town.
Those arrested, aged 26 to 35, face criminal charges over suspicion of supporting or participating "in a terrorist organisation", the OAG said in a statement.
"They are suspected of having supported the banned terrorist organisations Al-Qaeda and the Islamic State, notably by disseminating related propaganda among those associated with the mosque in question," it added.
Following the arrests, regional police in the Schaffhausen canton, where Neuhausen is located, announced that they had closed a mosque "as a measure to avert danger".
"The closure stems from suspicions that the premises were used to promote violent extremism and that some individuals frequenting the location had become radicalised," they said in a statement sent to the AFP news agency.
The OAG said that one of those arrested had been convicted several times of participating in and supporting IS, while another was facing criminal proceedings for supporting the group.
Prosecutors said several others among those arrested were already known to authorities for their connections to the radical An'Nur mosque in Winterthur in Zurich canton, which was closed in 2017.