Eleven men who were detained overnight on suspicion of planning major attacks with stockpiled weapons have been released after no evidence of a cache of weapons or explosives was found, a prosecution spokesman said.

The men, aged between 22 and 35, were held during raids conducted by police commandos in western and southern Germany on suspicion that they were supporters of Islamic State planning a “serious, state-endangering crime”.

The spokesman said the men, most of whom were Tajikistan nationals, were released after investigators’ suspicions proved unfounded.

Germany has been the scene of several Islamist militant attacks in recent years, including a 2016 truck attack on a Berlin Christmas market that killed 12 people.

Authorities across Europe are also on high alert for attacks from rightwing extremists after last week’s New Zealand mosque attack that left 50 dead.

Police are investigating links between the attacker and the far-right identitarian movement, which opposes Muslim immigration.