Barcelona's Antoni Gaudí-designed Sagrada Familia has agreed to pay instalments to the city authorities, after 136 years of construction without a building permit.

Work started on the UNESCO-listed basilica in 1882, but it never received an official permit from the local council.

It has now agreed to pay €36 million (£31 million) to the city, to pay for the municipal expenses generated by decades of construction work.

Barcelona's mayor Ada Colau tweeted in celebration of the "historic agreement" that took two years of negotiation, along with breakdown of the infrastructure projects the money will be used to fund.

The money will be paid over a period of 10 years, with €22 million (£19 million) going on the city's public transport network, €7 million (£6 million) on improving access to the metro system, €4 million (£3 million) on redeveloping the streets around the Sagrada Familia and €3 million (£2 million) on street maintenance and security.

Acord històric amb la Sagrada Família dsp d 130 anys sense llicència! Aportaran 36 milions en 10 anys pel veïnat i el barri:

✔️22M en #transportpúblic

✔️7M en accessibilitat a #metroBCN

✔️ 4M per reurbanització de carrers

✔️ 3M per manteniment, neteja, seguretat i agents cívics pic.twitter.com/AKXhQVJN0r — Ada Colau (@AdaColau) October 18, 2018

In return for the money, the authorities will officially regularise the work and the basilica will be able to formalise its permit to complete the design, announced Barcelona's council. A commission will then be set up to find the "urban solutions" needed in order to finish the decades-long project.

Designs for the Sagrada Familia have gone through several iterations since work started on a neo-gothic basilica in 1882. Gaudí took over the project to build a church for Barcelona in 1883, continuing to make significant changes to his new design throughout the building process.

Related story Animation shows completion of Antoni Gaudí's Sagrada Família

The Catalan architect died in 1926 after being struck by a tram, with only a quarter of the building complete. Subsequent architects have continued the work using the models and drawings he left behind, although these were lost in the Spanish civil war and debate continues over to what extent it has remained true to Gaudí's original vision.

The basilica's crypt, where the architect is buried, and facade have been recognised as original works of Gaudí and are inscribed on the UNESCO World Heritage list.

Now in the final stage of construction, 70 per cent of the basilica is complete, with work currently being undertaken on the six central towers. It is due to be completed in 2026, 100 years after Gaudí died.

Photography is from Shutterstock.