Pope Benedict has consecrated Barcelona's unfinished Sagrada Familia church, the most famous creation of the Spanish architect Anton Gaudi.
Thousands of people lined the Pope's route, but gay and lesbian activists protested against his presence.
The Pope sprinkled holy water on the altar before a congregation of more than 6,500 people.
Gaudi's greatest work has been under construction for more than a century and will not be finished before 2026, the BBC reports.
The current chief architect said he hoped the Pope's visit would provide the boost needed to finish the work. It is currently funded by private donations and visitors' fees.
Following the consecration, the main nave is now open for daily Mass for the first time.
Work began on Barcelona's Sagrada Familia in 1882, based on a design by Francesc de Paula Villar, who envisioned a simple church in a traditional neo-Gothic style.
But after he resigned in 1883, Gaudi was appointed the lead architect and redesigned the church entirely. His imaginative plans included 18 spires and five naves, rich with decorated organic detailing.
In 1911, the devout Catholic devoted himself entirely to the project, and spent the next 15 years living and working on site as a virtual recluse, supervising work. He died in 1926, after being run over by a tram.
Already a Unesco world heritage site visited by millions, it will become the world's tallest church when the 170-metre central tower is erected.