A report from German newspaper Bild states that an attack was being planned at Alexanderplatz, a large square and transport hub in Berlin.

The Berlin prosecutor Martin Steltner declined to comment on reports that Alexanderplatz was targeted, but acknowledged that according to their information the people arrested were planning an attack on Berlin.

The four "from the jihad scene are under investigation over suspicions that they are planning a serious act threatening the security of the state", Berlin police told AFP.

One of the two arrested is sought by Algerian authorities for his links to ISIS, police said.

"Investigations show that he has been trained militarily in Syria," they said in a statement.

The second Algerian was arrested for having falsified identity documents.

A woman was also detained in the course of the raids, although police did not specify the reason for the arrest.

Some 450 officers took part in the operation sweeping Berlin, and the states of North Rhine-Westphalia and Lower Saxony.

Since the November Paris attacks in which ISIS gunmen and suicide bombers attacked Paris nightspots, killing 130 people, German authorities have issued terrorism alerts on several occasions.

In November, a Germany-Netherlands football match was called off and on New Year's Eve, several Munich subway stations were closed over such threats.