(Newser) – It's taken nearly 140 years of building and two recent years of talks, but it looks like Barcelona's most-visited tourist attraction, the unfinished Sagrada Familia, may finally see its finishing touches put on. The Guardian and New York Times report a $41 million, 10-year deal has been struck between trustees for the famous Roman Catholic church and the city council so that the structure—whose name means "holy family," per Reuters—can get the licensing paperwork from the city, which it's never had, that it needs to be completed. The money paid out to the city, which People notes is the amount accrued over all these years in fees from lacking the proper permits, will help fund improvements to transportation services there.

Work began on the massive church in 1882, and the Times explains that a building permit was acquired in the town it was then located in: Sant Marti de Provencals. But that town was eventually absorbed into Barcelona, and city authorities there apparently never issued a new permit. To complicate things, Antoni Gaudi, the Catalan architect behind the building's design, died in 1926 after being hit by a tram, with only about 25% of the structure complete. Officials hope that with all the red tape about to be moved out of the way, the structure, which is about two-thirds done, could be finished by 2026, the century anniversary of Gaudi's death. (Not quite a landmark, but this unfinished US nuclear power plant went up for sale for $36.4 million in 2016.)

</s>(CNN) — After more than a century of illegal construction work, Barcelona's towering Sagrada Familia church has finally agreed to make things right with the city council.

Under the terms of a historic deal, church trustees will be able to get the permits they need in return for payments totaling €36 million ($41 million) over the next decade.

The money will be used to fund projects designed to mitigate the impact of approximately 4.5 million people who visit the unfinished basilica every year.

Tourists admire the intricate exterior design of the church. QUIQUE GARCIA/AFP/AFP/Getty Images

Barcelona Mayor Ada Colau hailed the impact of the agreement in a tweet

"The Sagrada Familia is an icon and the most visited monument in our city," she wrote.

"After two years of dialog we have made an agreement that will guarantee the payment of the license, secure access to the monument and facilitate local life with improvements to public transport and redevelopment of the nearby streets."

A police officer stands by the Sagrada Familia basilica in Barcelona on August 20, 2017. PASCAL GUYOT/AFP/AFP/Getty Images

Of the total, €22 million will be used to upgrade transport infrastructure serving the church and another €7 million to boost accessibility on the wider metro system of the second-largest city in Spain

A further €4 million will be used to remodel four major roads and €3 million dedicated to keeping the area clean and safe.

The church tweeted about predicted improvements in the organization of the local area.

Work on the Sagrada Familia may have dragged on for an unusually long time, but incredibly the edifice remains unfinished.

Construction of a neo-gothic church began in 1882 under the direction of architect Francisco de Paula del Villar y Lozano, but he soon resigned.

Related content Unity and defiance at memorial mass for Barcelona victims

He was replaced by Antonio Gaudí, the Catalan modernist whose idiosyncratic works are found all over Barcelona. Gaudí dedicated his life to building the Sagrada Familia until he died in 1926 after being hit by a tram.</s>Barcelona’s famously unfinished Sagrada Familia church has agreed to pay $41 million to city authorities after it was found to be lacking a building permit — despite breaking ground on construction well over a century ago. Time</s>Barcelona’s famously unfinished Sagrada Familia church has agreed to pay $41 million to city authorities after it was found to be lacking a building permit — despite breaking ground on construction well over a century ago.

The basilica will pay the city authorities back over a period of 10 years under new municipal registration, its first since construction began in 1882, the BBC reports. Barcelona Mayor Ada Colau hailed the deal as a historic agreement.

Funds from the deal are to be allocated to municipal projects such as improving the metro system and surface transport, as well as maintenance and public services in the area, according to a news release.

The church was designed by Catalan architect Antoni Gaudí, a modernist who also created several other eccentric edifices dotting Barcelona’s cityscape.

Despite the building’s impact on the community, it has been under construction for more than a century while holding no official status and without oversight of municipal authorities, according to Spain’s El Pais newspaper.

Read more: The Saga of Barcelona’s La Sagrada Familia

Gaudí died in 1926, but his unfinished masterpiece was nonetheless recognized as a UNESCO World Heritage site and has become one of Barcelona’s top tourist attractions. Today, it receives an estimated 20 million visitors a year, including 4.5 million who enter the sprawling chapel.

The church is slated for completion in 2026 — a century after its creator’s death.</s>Magnificent. Iconic. Landmark. ‘Illegal’ is probably not on anyone’s list of adjectives for the unfinished Sagrada Familia cathedral in Barcelona. It should be, though – for 136 years, building has been going on without a permit.

Barcelona’s most-visited tourist attraction is also Europe’s longest-enduring construction site – the foundation for the monumental Sagrada Familia cathedral was laid in 1882. Its original architect, Antoni Gaudi, was not tremendously worried about how long the building would take, famously commenting that his client (meaning God) was “not in a hurry.” Gaudi died in 1926, with the basilica nowhere near finished.

From there, it took another century and eight more architects to even get near completion. Between weather, time, and the ravages of war, parts of the unfinished cathedral have already required renovation.

Aside from deadlines, another thing Gaudi apparently never bothered with was properly clearing the construction with city authorities. It turns out, 136 years into the process, that it has been going on without an official status or supervision.

With just an estimated eight years until the building is finally completed, the Sagrada Familia almost managed to slip under the authorities’ radar entirely. Compared to how long it’s taken already, it has been caught out in the last possible moment.

Fortunately for the world’s architectural heritage, as well as the 4.5 million tourists visiting it every year, it was decided not to tear down the illicit structure. Instead, the cathedral will pay about €36 million ($41 million) of the fees it has run up over the years. That money, paid over the next 10 years, will go towards improving public transport to the Sagrada Familia and help the neighborhood around it. In return, Barcelona Mayor Ada Colau will officially clear the construction early next year.

If you like this story, share it with a friend!</s>The Sagrada Familia basilica in Barcelona has worldwide fame as an architectural treasure, the dreamlike masterpiece of the Catalan architect Antoni Gaudí, which draws millions of visitors a year though it is still under construction, 136 years after work began.

What it has not had for more than a century, according to the city, is a valid building permit.

The Sagrada Familia basilica has agreed to pay city authorities 36 million euros, or about $41 million, over 10 years to settle the dispute over the legality of the work and help pay for transportation improvements around the basilica.

Using the permit as leverage, the administration of Barcelona’s far-left mayor, Ada Colau, took on the Sagrada Familia, part of a trend of civil authorities around the country challenging the legal and tax status of Roman Catholic Church properties. Ms. Colau hailed the agreement, announced on Thursday, as historic.

The Sagrada Familia’s board had denied any wrongdoing, saying that it had a building permit — one issued in 1885 by Sant Martí de Provençals, which was an independent town at the time. Barcelona officials contend that after Sant Martí was absorbed into the city several years later, the construction required a Barcelona permit; the board says that for more than a century, no one asked for any such thing.</s>The iconic Sagrada Familia basilica in Barcelona has agreed to pay €36m (£31m) to authorities after going without a building permit for more than 130 years.

Spanish architect Antoni Gaudi's famous building has been under construction for 136 years - but with no official oversight or permit from either the local council or regional government.

The cathedral is also not listed in the property registry and since 1995 has only been marked as an empty plot belonging to the diocese of Barcelona, according to Spanish newspaper El Pais.

In 2015, the construction board and Barcelona Mayor Ada Colau began negotiating to regulate the building and licence payments

Over the next decade, the basilica's money will fund improvements to public transport and access to the monument, as well as assisting the local neighbourhood.

By next year, its status should become regularised, the mayor said.

"Today, the Sagrada Familia and [Barcelona city council] signed an agreement to begin the procedures to obtain the works licence of the Antoni Gaudi project," the basilica's Twitter account posted.

El Pais report that the lack of oversight has seen some building anomalies, including where eight columns were found to have been built up to 50cm across the pavement in 2007.

The UNESCO World Heritage Site is due to be completed in 2026, a hundred years after the death of its architect.

It attracts 4.5 million annual visitors - an average of 12,000 people a day.</s>The Sagrada Familia basilica in Barcelona has worldwide fame as an architectural treasure, the dreamlike masterpiece of Catalan architect Antoni Gaudí, which draws millions of visitors a year though it is still under construction, 136 years after work began.

The Sagrada Familia basilica in Barcelona has worldwide fame as an architectural treasure, the dreamlike masterpiece of Catalan architect Antoni Gaudí, which draws millions of visitors a year though it is still under construction, 136 years after work began.

What it has not had for more than a century, according to the city, is a valid building permit.

The Sagrada Familia basilica has agreed to pay city authorities 36 million euros, or about $41 million, over 10 years to settle the dispute over the legality of the work and help pay for transportation improvements around the basilica.

Using the permit as leverage, the administration of Barcelona’s far-left mayor, Ada Colau, took on the Sagrada Familia, part of a trend of civil authorities around the country challenging the legal and tax status of Roman Catholic Church properties. Colau hailed the agreement, announced Thursday, as historic.

The Sagrada Familia’s board had denied any wrongdoing, saying that it had a building permit — one issued in 1885 by Sant Martí de Provençals, which was an independent town at the time. Barcelona officials contend that after Sant Martí was absorbed into the city several years later, the construction required a Barcelona permit; the board says that for more than a century, no one asked for any such thing.

Work began in 1882 on the Sagrada Familia, whose radical design, incorporating elements of Gothic revival, art nouveau, modernism and Asian art, has been compared to everything from a Dr. Seuss drawing to an underwater forest of kelp and coral.

Gaudí died after being hit by a tram in 1926, with the project only about one-quarter complete, and for decades after his death, progress was slow, sporadic and often intensely debated. But the pace of work picked up in recent years. The Sagrada Familia is more than two-thirds completed, and planners hope to finish it in 2026, in time for the centenary of Gaudí’s death.

Critics contend that the Sagrada Familia has drifted too far from the vision of Gaudí — some of his plans were destroyed long ago — or that it has more appeal as one of the world’s greatest unfinished monuments.

Even incomplete and surrounded by scaffolding and building cranes, Sagrada Familia is Barcelona’s most famous monument, visited by over 10,000 people a day and pictured on countless postcards and calendars. In November 2010, Pope Benedict XVI consecrated the church as a basilica and held Mass there before 7,000 people.

Colau and her administration accused the basilica’s board of working without a building permit, failing to submit required plans to tear down existing residential structures to finish the Sagrada Familia’s esplanade, and failing to pay construction taxes.

The city’s complaints struck a nerve in a country where, over several decades, the church had quietly registered thousands of properties, including the famed cathedral-mosque Córdoba, as tax-exempt, leading to claims of tax evasion and a debate over how the church spends tourism revenue.

After a Socialist prime minister, Pedro Sánchez, took power in June, his government announced that it would publish an inventory of all property claimed by the Catholic Church, opening the door to potential challenges to that ownership.

Colau faced pressure to resolve the conflict over the Sagrada Familia before what is expected to be an uphill campaign for re-election next spring.

Under the deal struck this week, city authorities will go ahead with transportation infrastructure work around Sagrada Familia, including a feasibility study to build a passageway linking the basilica directly to the closest subway station. The agreement did not settle the dispute over the planned seizure of nearby homes.

But the basilica will, at last, have a building permit.</s>After more than a century of illegal construction work, Barcelona's towering Sagrada Familia church has finally agreed to make things right with the city council.

Under the terms of a historic deal, church trustees will be able to get the permits they need in return for payments totaling €36 million ($41 million) over the next decade.

The money will be used to fund projects designed to mitigate the impact of approximately 4.5 million people who visit the unfinished basilica every year.

"The Sagrada Familia is an icon and the most visited monument in our city," she wrote.

"After two years of dialog we have made an agreement that will guarantee the payment of the license, secure access to the monument and facilitate local life with improvements to public transport and redevelopment of the nearby streets."

A further €4 million will be used to remodel four major roads and €3 million dedicated to keeping the area clean and safe.

Work on the Sagrada Familia may have dragged on for an unusually long time, but incredibly the edifice remains unfinished.

Construction of a neo-gothic church began in 1882 under the direction of architect Francisco de Paula del Villar y Lozano, but he soon resigned.

He was replaced by Antonio Gaudí, the Catalan modernist whose idiosyncratic works are found all over Barcelona. Gaudí dedicated his life to building the Sagrada Familia until he died in 1926 after being hit by a tram.

Since then a string of architects have worked to finish the church according to Gaudí's original design and work is scheduled to end in 2026, marking 100 years since his death.</s>Barcelona’s Sagrada Familia has famously been under construction for more than 100 years — since 1882 to be exact — but it turns out the facility doesn’t have the proper building permits. That means the Unesco world heritage site, designed by renowned architect Antoni Gaudí, has accrued $41 million (£31 million) in fees from lacking the proper permits, according to the .

RELATED: Disney World Announces New ‘Nature-Inspired’ Resort to Open in 2022: Everything to Know Now

On Thursday, officials running the church’s construction agreed to pay city authorities the money over a 10-year period. The funds will go to public transportation to increase access to the tourist attraction and make other improvements in the surrounding neighborhood, BBC reported.

RELATED VIDEO: Queen Letizia’s Tense Exchange with Mother-in-Law Queen Sofia on Easter Sunday Caught on Camera

For years, the board of the Sagrada Familia has maintained that it had a permit issued in 1885 by the independent town of Sant Martí de Provençals, which was absorbed into Barcelona several years later. City officials said that the church then should’ve applied for a Barcelona permit, but the board insisted no one asked for it, according to the .

RELATED: JetBlue Is Giving Away Free Flights This November — With One Big Catch

The church — with its famous mix of architectural styles, from Gothic revival to Art Nouveau, from modernism to Asian art — receives 20 million visitors every year, the city’s press release states. Some 4.5 million of them take the time to see the inside of the space.

The Sagrada Familia’s construction will finish in 2026, 100 years after Gaudí’s death.
136 years after beginning construction, the Sagrada Família in Barcelona receives a building permit to complete construction.