It is Barcelona's most visited landmark, but after 136 years of unlicensed construction the law has finally caught up with La Sagrada Familia. The church's trustees have now reached an agreement with the city of Barcelona that involves €36 million (US$41 million) in payments, with the church's first official building permit coming back the other way.

Architectural icon Antoni Gaudi spent more than 40 years designing La Sagrada Familia, and the cornerstone of the temple was laid in 1882. Now, 136 years later, there is still around 30 percent of the basilica's construction to be completed.

But that hasn't stopped some 20 million visitors swinging by Gaudi's masterpiece every year, 4.5 million of whom actually enter the temple. This, along with other tourist attractions around Barcelona, has placed a massive strain on the city's infrastructure, so the council is planning some upgrades.

The agreement will see a range of investments designed to accommodate the growing hordes of tourists, which have actually been met with some prickly resistance from locals.

Twenty-two-million euros (US$25m) will go towards new public transport services, while €7m (US$8m) will go towards improving access between the church and the metro, including the possibility of a direct terminal. Meanwhile, €4m (US$4.5 m) will be invested in redeveloping the streets of the Sardenya, Provença, La Marina and Mallorca, while €3m (US$3.4m) will go towards maintaining and cleaning the city, along with employment of security and civic agents.

In return, the board finally gains the official permit needed to construct the church, which it hopes to be complete in 2026, the centenary of Gaudi's death. The agreement also states that the current visitor limit cannot be increased until then.

View gallery - 4 images