Three suspects who pledged allegiance to Islamic State have been detained during a massive counter-terrorism raid near Frankfurt, which authorities say foiled a major terrorist attack involving explosives and firearms.

Over 170 officers, including members of an elite police anti-terrorism team called SEK, burst into three flats in the town of Offenbach-am-Main on Tuesday evening. The main suspect was a 24-year-old German of Macedonian origin, while his accomplices – two Turks aged 22 and 21 – were arrested during separate raids in the same town.

The major suspect came disturbingly close to readying an attack, a Frankfurt state prosecutor told the media. He had already procured parts to manufacture homemade explosives and had tried to buy weapons on the darknet, part of the internet often used for illegal business.

The men, who grew up together in Offenbach, appear to have planned an attack in the Rhine-Main region. They had aimed to kill “as many people, so-called infidels, as possible,” Nadja Niesen, a spokeswoman for the prosecutor’s office, said.

Although it is yet unknown whether they had chosen a specific target, the police intervention “took place in time to prevent a concrete threat.”

Authorities managed to trace the suspects after they got a tip-off from witnesses who saw them pledge allegiance to Islamic State (IS, formerly ISIS). One of the men arrested has a relative who traveled to Syria to join IS, Die Welt reported.

Germany has been on high alert on the back of increased terrorism threat. Back in 2016, the country suffered its deadliest attack, when a 23-year-old Tunisian man rammed a hijacked truck into a Berlin Christmas market, killing 12 people.

The raids come just a day after Turkey announced that it will start sending European IS militants back to the countries from which they came. Germany is awaiting the arrival of 10 men, women and children, all with links to the terrorist group.

Also on rt.com Nuremberg train station shut down for counter-terrorism drill amid security concerns over right-wing extremists (VIDEO)

The so-called repatriation triggered a heated debate on whether or not to take the captured fighters back. Earlier in April, Berlin passed a law stripping dual nationals of their German citizenship if they fought abroad for known terrorist groups.

Meanwhile, those who can prove their citizenship have the right of return, the government said on Monday, but suspected militants may still stand trial after arriving home.

Like this story? Share it with a friend!