Pope Benedict XVI will be safe when he visits Germany next month, a top police official said, weeks after an attempted train bombing exposed holes in Germany's counterterrorism strategy.

Joerg Ziercke, head of the Federal Criminal Office, said in remarks published Sunday that the detention of three suspects for the failed July 31 attack meant the risk of terrorism in Germany had eased.

According to the Bild am Sonntag newspaper, Ziercke also doubted that Islamic extremists would target the pontiff. However, he said that all security measures and precautions had been taken.

"The pope is safe in Germany," Ziercke was quoted as saying. "The current arrests mean that the danger has peaked."

Benedict visits his native Bavaria in southern Germany in mid-September, including stops in Munich and the village of Marktl am Inn, where he was born.

German authorities are holding a Lebanese man and a Syrian in connection with the failed attack on two trains in western Germany. A third suspect is in Lebanese detention.

Prosecutors say the attack failed only because the bombs, built to a design downloaded from the Internet and concealed in wheeled suitcases, failed to explode.

Investigators are still looking into the suspects' motives and affiliation, though Federal Prosecutor Monika Harms said Saturday the trio may have acted "on the basis of convictions shared by Al Qaeda."

Politicians have responded with demands for tougher counterterrorism measures and for Muslims in Germany to do more to unmask extremists in their ranks.

In particular, Chancellor Angela Merkel's conservatives are urging their Social Democrat coalition partners to quickly approve a national database on potential terrorists.

Hardliners insist the information stored in the database must include a suspect's religious affiliation -- a proposal resisted by liberals and civil rights groups.

"Islamic terror is fed by a perverted version of Islam," Edmund Stoiber, the conservative governor of Bavaria, wrote in a guest column for Bild am Sonntag on Sunday. "Every minus for the anti-terror database is a minus for the security of our citizens."

Social Democrat leader Kurt Beck has cautioned repeatedly against "protecting freedom to death."