The next World Youth Day (WYD) will be held in Madrid, Pope Benedict XVI announced on Sunday as he waved "arrivederci" to the Catholic masses in Sydney.
The 81-year-old pontiff has officially brought the church's marquee youth event in Australia to a close, ending six days of religious and celebratory events staged across the city.
At the conclusion of the WYD Papal Mass at Randwick Racecourse, the Pope announced WYD 2011 would be hosted by Madrid, the capital of Spain.
Earlier, Pope Benedict XVI declared the spirit of the church alive and well as he celebrated the final mass of World Youth Day in the "great south land of the Holy Spirit".
Before a vast congregation at Sydney's Randwick Racecourse, the 81-year-old pontiff said he had shared an "unforgettable experience" during his first visit to Australia.
Sunday is the culmination of a six-day Catholic youth event that has attracted pilgrims from more than 170 nations.
The Papal Mass was expected to draw 500,000 people to Randwick and surrounds - the largest crowd ever assembled in Australia, according to WYD organisers.
The pontiff had a bird's eye view of the faithful when he flew over Royal Randwick Racecourse in a helicopter on Sunday morning before doing a lap of the racecourse in his Popemobile.
As the motorcade neared its end, a baby was passed to the Holy Father, who kissed and blessed the child.
The mass has incorporated aspects of the Pacific region, with young men from Fiji - in traditional dress - escorting the holy gospel to the altar.
His Holiness officiated over the sacrament of confirmation for 24 adults, two from each Australian state and the other 12 from around the
world, during the mass.
"As we pray for the confirmands, let us ask that the power of the Holy Spirit will revive the grace of our own confirmation," the pontiff said.
"May he pour out his gifts in abundance on all present, on this city of Sydney, on this land of Australia and on all its people."
He said the events during World Youth Day had provided a wonderful, spiritual experience.
"Here in Australia, this `great south land of the Holy Spirit', all of us have had an unforgettable experience of the spirit's presence and power in the beauty of nature," the Pope said in his homily.
"Our eyes have been opened to see the world around us as it truly is: `Charged' as the poet says, `with the grandeur of God', filled with the glory of His creative love.
"Here too, in this great assembly of young Christians from all over the world, we have had a vivid experience of the spirit's presence and power in the life of the church.
"We have seen the church for what she truly is: the body of Christ, a living community of love embracing people of every race, nation and tongue, of every time and place, in the unity born of our faith in the risen Lord."
The spiritual leader of the world's Catholics on Saturday night spent several hours with more than 235,000 pilgrims who camped out under the stars at Randwick after making 9km pilgrimage across the Sydney Harbour Bridge and through the city streets.
The pilgrimage was one of a number of WYD events that brought Sydney to a standstill in the past week, including the spectacular Stations of the Cross and the Pope's official arrival via a Sydney Harbour boat-a-cade.
"Here in Australia, let us thank the Lord for the gift of faith which has come down to us like a treasure passed on from generation to generation in the communion of the church," Pope Benedict said on Sunday.
"Here in Oceania, let us give thanks in a special way for all those heroic missionaries, dedicated priests and religious, Christian parents and grandparents, teachers and catechists who built up the church in these lands - witnesses like Blessed Mary MacKillop, Saint Peter Chanel, Blessed Peter To Rot, and so many others.
"The power of the spirit revealed in their lives, is still at work in the good they left behind, in the society which they shaped and which is being handed on to you."
He asked the pilgrims what their legacy would be to future generations, posing the question: "Are you building your lives on firm foundations, building something that will endure?"
He said the world and the church both needed renewal.
"In so many of our societies, side by side with material prosperity, a spiritual desert is spreading," he warned.
"An interior emptiness, an unnamed fear, a quiet sense of despair.
"How many of our contemporaries have built broken cisterns in desperate search for meaning - the ultimate meaning that only love can give."
He said: "The church also needs this renewal! She needs your faith, your idealism and your generosity so that she can always be young in the spirit."
To applause from the huge congregation, His Holiness called on them to welcome Jesus.
"Do not be afraid to say `yes' to Jesus, to find your joy in doing his will, giving yourself completely to the pursuit of holiness, and using
all your talents in the service of others."
Earlier, Sydney Archbishop Cardinal George Pell said as he looked upon the congregation, it was obvious "the church is alive, and the church is young."
He gave thanks for WYD, which he described as a gift for the church as a whole.
"At World Youth Day, the church appears as she truly is, alive with evangelical energy," he said.
The mass ended at 12.50pm (AEST), with words of thanks from Cardinal Pell and Cardinal Stanislaw Rylko, president of the Pontifical Council for the Laity.
"Your paternal presence is great encouragement for us because it is an eloquent sign of the love of the church for the young generations," Cardinal Rylko said.
"In you, Holy Father, we see a church that is a friend to young people: a church that listens to them, searches them out, accompanies them and teaches them.
"Above all, thank you for the words you addressed to these young people. Your words touched their hearts and will serve as a compass that they can depend on as they continue on their way."