Sydney, Australia - The Pope has urged young people to stay away from the "spiritual desert" he says is spreading across the world, at the end of his trip to Australia.
Pope Benedict XVI told a crowd of about 200,000 people at the Catholic Church's World Youth Day event that they should build a new age free from greed.
The world "needs renewal", he said, and challenged the young pilgrims to be agents of change.
Earlier in the week, he apologised for abuse carried out by Catholic clergy.
'Unnamed fear'
The 81-year-old pontiff was at the centre of a spectacular finale to the Church's six-day-long youth festival, although the numbers attending Mass fell short of the 500,000-plus expected by organisers.
The Pope flew by helicopter over many thousands of pilgrims, many of whom had camped out in cold weather at Sydney's Randwick Racecourse in preparation for Sunday's events.
He then met some devotees at closer quarters, in the popemobile, before celebrating Mass.
"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," he said in his homily.
He said God was asking young people to be "prophets for a new age" in which "hope liberates us from the shallowness, apathy and self-absorption which deadens our souls and poisons our relationships".
At the close of his address, the Pope announced that the next World Youth Day, in 2011, would be held in Spain, and pledged to attend.
"Until then, let us continue to pray for one another and let us joyfully bear witness to Christ before the world," he told pilgrims, many of whom had travelled from around the world to be there.
Young people at the event said they were sad that the final Mass marked the end of World Youth Day.
Eighteen-year-old Alicia Desa, who had travelled from Toronto in Canada, told AFP news agency it was "a bit surreal" that the events had ended.
"It's kind of sad that it's all over, but people are looking forward to the next one."
The BBC's Nick Bryant, in Sydney, said the Vatican would regard the event as a huge success.
He said the thousands of young people who had attended appeared to have been energised by the Pope.
World Youth Day, aimed at strengthening the faith of young Catholics, has been held every two or three years since 1986.