As he wrapped up a visit to Australia on Sunday, Pope Benedict XVI warned a crowd of 400,000 young people that a feeling of spiritual emptiness often accompanies material wealth.

He urged them to avoid the pitfalls of prosperity as he led an outdoor mass for pilgrims who had gathered for the Roman Catholic church's six-day World Youth Day festival in Sydney.

pope-cp-5204531

Pope Benedict XVI greets pilgrims at Randwick Racecourse on his arrival for the final mass of his Australian tour. ((Rob Griffith/Associated Press))

"In so many of our societies, side by side with material prosperity, a spiritual desert is spreading: an interior emptiness, an unnamed fear, a quiet sense of despair," the pontiff said.

The Pope referred to the modern world’s "hard crust of indifference" to God and said the world "wants to forget God, or even reject him in the name of a falsely conceived freedom."

He urged followers to throw off indifference and embrace a new age free from "shallowness, apathy and self-absorption," which he said "deadens our souls and poisons our relationships."

"A new generation of Christians is being called to help build a world in which God’s gift of life is welcomed, respected and cherished — not rejected, feared as a threat and destroyed," the Pope told the crowd.

The pope, 81, also announced that Madrid, Spain, would host the next World Youth Day in 2011 and told the pilgrims that he looks forward to being there in three years.

The mass came a day after the pope made an apology for the sexual abuse of children by Australia's Roman Catholic clergy, keeping up efforts begun in the United States to publicly atone for what he called "evil" acts by priests and a "grave betrayal of trust."