Muslim communities in Germany have called for more police protection after the arrest of members of a rightwing extremist group that is believed to have been plotting large-scale attacks on mosques around the country.

Twelve men who were arrested following police raids on Friday had been planning attacks using semi-automatic weapons on worshippers during prayers in 10 German states, said to have been inspired by those carried out in New Zealand last year, according to a government spokesman.

Investigators had been following the men for months, monitoring their conversations and online activity, after suspecting them of having formed a terror group.

They eavesdropped on a meeting in North Rhine-Westphalia earlier this month in which the alleged ringleader, 53-year-old Werner S, outlined the group’s concrete plans for “commandos” to attack Muslims in small communities across the country. Two of the men were elected to acquire weapons, and all members were expected to contribute towards a €50,000 (£42,000) fund to finance the operation.

German prosecutors spoke of the planned attacks as “mosque massacres” inspired by the attacks on two mosques in Christchurch, New Zealand, in spring 2019, in which 51 people were killed by a gunman.

According to the men’s discussions, the attacks were intended to provoke revenge attacks and to evolve into a civil war, authorities said. Four of the arrested men are being treated as suspected terrorists, eight as accomplices, including an administrative police clerk.

The plot came to light after a police informer managed to infiltrate the group.

Björn Grünewälder, the interior ministry spokesman, said while there was relief that the plot had been foiled, he was alarmed by the speed in which the group had formed. “It’s shocking what has come to light here, and that there are cells which appear to have become radicalised in a very short length of time,” he said.

Angela Merkel’s spokesman, Steffen Seibert, insisted the government was committed to protecting religious groups. “It is the task of the state and naturally of this government, to protect the free practice of religion in this country, regardless of what religion that might be,” he said.

“Anyone practising their religion in Germany within our legal framework should be able to do so without being endangered or threatened,” Seibert added.

Police had raided homes of the would-be attackers early on Friday morning, aware that they might already have acquired weapons.

An attack last June on Walter Lübcke, a conservative local politician who had spoken out in defence of refugees, and the October attack on a synagogue in the eastern city of Halle have made German authorities increasingly aware of the threat of rightwing extremist crime.

Police are watching the activities of 53 men and women associated with the extreme right, who they say are capable of carrying out violence. In 2016, it was 22.

Der Spiegel reported that the group had formed last autumn, the majority of them meeting at an old saw mill in Baden-Württemberg, where the discussion focused on weaponry and how to obtain it. Werner S, who was nicknamed Teutonico by the group, tried to recruit like-minded men who he said had to be “intelligent, hard, brutal and fast”.

He talked about wanting to build an underground army, modelled on the so-called Freikorps or free corps – the irregular German military volunteer units, which existed from the 18th century but were at their most powerful in the early 1900s fighting on behalf of the government against Soviet-backed German communists during the Weimar Republic.

Police investigators said to what extent the men just talked, and to what extent their intentions might have been realised, would be revealed during their investigation.

Among the finds during the raids was a 9mm pistol and ammunition at Werner S’s house. At other properties they seized homemade egg-shaped hand grenades, axes, crossbows, spiked maces and several knives. The group had intended to acquire “slam guns” as used by the antisemitic attacker in Halle. In their discussions, according to Spiegel, the men had used the codeword “electro-scooters” to describe the weapons, and referred to the accompanying munition as “batteries”.

The chairman of the Central Council of Muslims in Germany, Aiman Mazyek, said the planned attacks were “very alarming” and called for more security at the country’s mosques. He told the Berlin daily Taz: “Without state protection, the situation is getting ever more dangerous. What are the security authorities waiting for?”

Mohammad Dawood Majoka, a spokesman for the Ahmadiyya Muslim community, called for an “increased attentiveness by the police”. Zekeriya Altuğ, a spokesman for Ditib, the umbrella organisation for a large number of mosques in Germany, said the arrests highlighted “the seriousness of the situation … the point of no return is getting ever closer,” he said.

Taz said investigators had allegedly made links between Werner S and the hard-right populist Alternative für Deutschland party, after finding his email address on an AfD contact list.

But an AfD spokesman told the paper it had “never at any point in time” been in contact with Werner S, and had no connection to him. He was also friends on Facebook with an AfD functionary from Saxony-Anhalt.