THE HAGUE, Netherlands — Seven men were arrested Thursday in the Netherlands on suspicion of plotting a large-scale extremist attack that Dutch prosecutors said they think was foiled following a months-long investigation.

The national prosecutor's office said in a statement that heavily armed police arrested the men in the towns of Arnhem, about 62 miles south of Amsterdam, and Weert in the southern Netherlands close to the borders of Germany and Belgium.

The investigation was launched by intelligence suggesting the alleged ring leader, a 34-year-old man of Iraqi heritage, wanted to carry out an attack at the site of a large event and cause multiple casualties, according to the statement.

The suspects allegedly wanted to use bomb vests and assault rifles to do harm at the event, and planned to detonate a car bomb at another location, prosecutors said. An investigation of potential targets was continuing.

Prosecutors said the suspects ranged in age from 21 to 34. Three of them, including the 34-year-old Iraqi, were previously convicted of attempting to travel overseas to join extremist networks.

The men were attempting to obtain AK47 assault rifles, handguns, bomb vests, grenades and raw materials for bombs and were looking for opportunities to train with such weapons, according to the statement.

Prosecutors said that the investigation sped up this month because of the suspects' "advanced preparations."

Minister for Justice and Security Ferd Grapperhaus told Dutch national broadcaster NOS that police acted in time to prevent an attack.

"In a sense it is serious, but luckily it's also good news — a terrorist cell that was plotting an attack has been taken down," Grapperhaus said. "They weren't so far that it was a danger to society, in the sense that it was nearly too late. But they were quite far in their preparations."

The men were to be brought before an investigating judge on Friday at a behind-closed-doors hearing.

The arrests came weeks after a 19-year-old Afghan citizen living in Germany allegedly stabbed two American tourists at Amsterdam's main railway station in what prosecutors described as an attack with an extremist motive.

The Dutch anti-terror coordinator's office said in a tweet Thursday that the allegedly foiled plot fit the current threat profile for the Netherlands, which is at four on a scale that tops out at five. The office did not raise the level following the arrests.

"Jihad networks are also active in the Netherlands with the intention to plot attacks in Europe," the office said. "Today's arrests must be seen in that light."