Interrupted by the applause of the estimated 10,000 people gathered for the audience in St. Peter's Square, the Pope told those who pray for him, "I thank you from the depths of my heart."
Continuing a series of talks about examples of prayer in the Acts of the Apostles, the Pope turned to the story of St. Peter's imprisonment in Jerusalem and his miraculous liberation. The biblical account emphasizes how the entire Christian community was gathered for fervent prayers for the apostle while Peter slept in the jail, the Pope said.
The episode, he said, "demonstrates the power of prayer."
"With constant, trusting prayer," the Pope said, the Lord frees people from their chains, accompanies them through the dark night, and "he gives us the serenity of heart to face life's difficulties, including rejection, opposition, persecution."
"Constant, unanimous prayer is a precious instrument for overcoming the trials that arise in life," because it is a sign of being united with God and one another, he said.
Pope Benedict said St. Peter's liberation offers the church today a lesson in the importance of both authentic prayer and unity in prayer.
While the Acts of the Apostles recounts a Christian community facing persecution, the Letter of St. James tells of a community in danger because of its internal divisions caused by selfishness -- "the dictatorship of one's desires" -- and a lack of prayer, he said.
St. James warns the community that their prayers will not be answered if they are motivated mainly by a desire "to obtain what you want" and not what God desires for the good of the community, he said.
Even preaching and teaching about God risks losing its meaning and power to touch hearts and change lives if it is not supported by prayer, which is "a continuous, lively dialogue with God," the Pope said.
Pope Benedict said every community -- "both small ones like the family and large ones like the parish, diocese and the whole church" -- need to remember the importance of being united in prayer.