Icelandic police have arrested four people allegedly involved in preparing a "terrorist attack".

The police said at a press conference on Thursday that they had confiscated several semi-automatic weapons, including some from the 3D printer, and thousands of ammunition bullets in nine different locations.

Four Icelanders around the age of 20 were arrested on Wednesday in Kopavogur, a suburb of the capital Reykjavik, and in the town of Mosfellsbaer in southwest Iceland, police said.

Two of them are in custody.

While the motives for the planned attack were still unclear, the possible targets are said to be "various institutions" and "citizens of the state", including parliament and the police.

Now it is being checked whether the men have connections to extremist organizations or foreign authorities, the officials said.

"As far as we know, this is the first time that an investigation of this type has been opened (in Iceland)," said Police Representative Karl Steinar Valsson.

According to the Global Peace Index, the small country with around 375,000 inhabitants is considered the “most peaceful country in the world”.

Iceland has one of the lowest crime rates in the world, although violent crime has increased in recent years.