Berlin police arrested two men Thursday on suspicion of acquiring chemicals for a planned bomb attack and searched a mosque in the German capital, a spokesman told AFP.

The arrest of a 24-year-old German of Lebanese origin and a 28-year-old from the Gaza Strip, comes ahead of the 10th anniversary of the September 11, 2001 attacks in the United States and a planned visit to Berlin by Pope Benedict XVI later this month.

Police raided the homes of the two men in the districts of Kreuzberg and Neukoelln as well as a mosque in the working class neighbourhood of Wedding.

The spokesman said authorities had been investigating for several months but declined to provide further details.

A spokeswoman for the public prosecutor's office said it had launched a probe against the men on "suspicion of preparing a major violent crime against the state".

Authorities say they had acquired several coolants and an acid normally used in farming with the aim of building an explosive, the daily Berliner Morgenpost reported.

The suspects regularly attended the mosque in Wedding and occasionally spent the night there, the newspaper said, adding that the probe began when the companies where the chemicals were ordered reported the suspicious purchases to police.

Authorities declined to confirm this.