Facing discontent within his German flock, the pope said religion must not be banished from public life and that Christian churches "are walking side by side" in the battle.
"They speak up jointly for the protection of human life from conception to natural death," he told a meeting of Orthodox Christians on the third day of a visit to his native Germany.
"Knowing, too, the value of family and marriage, we as Christians attach great importance to defending the integrity and the uniqueness of marriage between one man and one woman from any kind of misinterpretation," he said. "Here the common engagement of Christians, including many Orthodox and Oriental Orthodox Christians, makes a valuable contribution to building up a society equipped for the future."
The Vatican was undeterred by an incident earlier in the day in the eastern city of Erfurt on the edge of the security zone in which a man fired an air gun at a security guard about an hour before a papal Mass.
Benedict's spokesman, the Rev. Federico Lombardi, said there was "no worry" in the papal entourage over the incident, and the pontiff was not informed about it before the Mass. "It didn't seem particularly urgent," he told reporters on the pope's plane after the Mass. Police said the alleged shooter had been arrested and that there were no injuries.
Police later identified the suspect as a 30-year-old Erfurt man who lived in Berlin. They said an air rifle and air pistol were found in his top-floor apartment, and that he was being held on suspicion of attempting to cause serious bodily harm.
In his homily in Erfurt, before a crowd of 30,000 people, the pope acknowledged that the collapse of communism in the former East Germany more than 20 years ago has allowed the church to function freely, but he questioned whether that change has brought any increase in faith.
"Are not the deep roots of faith and Christian life to be sought in something very different from social freedom?" the pope said. "It was actually amid the hardships of pressure from without that many committed Catholics remained faithful to Christ and to the church."
After the Mass, the pope flew to Freiburg, a city with a large Catholic population in southern Germany, the final stop of his visit, where about 25,000 people lined the streets, cheering and waving as he drove from the airport to visit the downtown cathedral.
At an evening prayer vigil on the city's outskirts, he urged more than 20,000 youth to overcome "a tendency toward evil," encompassing "selfishness, envy, aggression."
"Again and again in history, keen observers have pointed out that damage to the church comes not from opponents, but from uncommitted Christians," he said.
But the pope also encouraged the youth not to be frightened by the perpetual quest of being a good Christian.
"Dear friends, Christ is not so much interested in how often we stumble and fall in our life, as in how often we pick ourselves up again," Benedict said.
The pope's four-day state visit comes as Germany's church has been losing tens of thousands of followers amid revelations that hundreds of children and young people were abused by clergy and church employees.
On Friday night, he took a step to placate some of the anger by meeting for half an hour with two women and three men from parishes across Germany who were among the abused. The Vatican said the pope expressed "deep compassion and regret" at the suffering of those who were abused and assured them the church is seeking "effective measures to protect children."
German church leaders acknowledge the scandal has cost them badly needed trust among the roughly 24 million German Catholics.
"I appreciate that he (the pope) is facing the problem, and that he is meeting these people," said Klaus Militzer, 68, from Erfurt, who was among pilgrims streaming into the cobbled square beneath the city's main cathedral early Saturday.
"He can't undo it, that's not possible, but I think it is good that he is asking for forgiveness and sending a signal."
Benedict has been accused by victims groups and their lawyers of being part of a systematic cover-up by the church hierarchy for pedophile priests in his earlier roles as an archbishop in Germany and later at the helm of the Vatican morals office.
Victims groups were quick to denounce the pope's meeting with German victims as an empty gesture. They maintain the church has not done enough to prosecute offending priests and prevent future cases of abuse.
Germany's Bishops Conference has set up a telephone hotline to counsel victims and help them to take legal steps against offending priests when possible.
Catholic leaders had warned ahead of Benedict's visit that there was no quick solution, but they hoped the pontiff could help heal wounds left by the scandal.
"I think it's certainly an important issue, but it's not the most important thing about a pope's visit," Monika Graner, a pilgrim from Wuerzburg, said of the sex abuse scandal.
But protests have also accompanied Benedict's German tour, although numbers have been smaller than expected. Some 9,000 people turned out in Berlin to denounce the Vatican views on homosexuality, contraception and other issues.
The 84-year-old pope has seemed tired at times, but his spokesman Lombardi said "he's very well," despite the heavy schedule.
"It is wonderful how he experiences all moments of this trip really intensively," Lombardi said.