Pope Benedict XVI told the German parliament on Thursday that politicians must not sacrifice ethics for power, evoking the Nazi excesses of his homeland as a lesson in history.
Amid scattered protests outside and a boycott by some lawmakers, Benedict began his first state visit to Germany in a bid to stem the tide of Catholics leaving the church while acknowledging the damage caused by the clerical sex abuse scandal.
The pope spoke for 20 minutes in the historic Reichstag parliament building, which was torched in 1933 in an incident used by Hitler to strengthen his grip on power.
"We Germans know from our own experience" what happens when power is corrupted, Benedict said, describing Nazis as a "highly organized band of robbers, capable of threatening the whole world and driving it to the edge of the abyss."
But he said that even under the Nazi dictatorship resistance movements stuck to their beliefs at a great risk, "thereby doing a great service to justice and to humanity as a whole."
"Even today, there is ultimately nothing else we could wish for but a listening heart — the capacity to discern between good and evil, and thus to establish true law, to serve justice and peace," he said.
Benedict, who has long favored environmental causes, voiced strong support for Germany's ecological movement, calling it "a cry for fresh air which must not be ignored or pushed aside."
About 100 lawmakers from opposition parties boycotted the pope's appearance, claiming it violated the church-state separation. But Benedict looked out on a mostly full house as guests occupied the empty seats and finished his speech to a standing ovation.
Police that estimated only "several thousand" protesters ended up showing up at the capital's Potsdamer Platz, far fewer than organizers had predicted. Some 6,000 officers were on hand throughout the city and there were no reports of any incidents.
In the rally during the pope's speech, protesters held signs with slogans like "not welcome" and "where there's enlightenment, there's future."