FILE PHOTO: A full moon "Super Blue Blood Moon" rises behind Mediterranean sea, next to Sagrada Familia Basilica in Barcelona, Spain January 31, 2018. REUTERS/Albert Gea/File Photo 
 
 BARCELONA, Spain (Reuters) - More than 130 years after construction first began, Barcelona’s towering Sagrada Familia cathedral is finally to get a building permit, the city council and the monument’s official blog said. 
 
 Cranes and scaffolding still flank the ornate spires of Spanish architect Antoni Gaudi’s most famous monument, which draws some 20 million visitors a year. Stained-glass windows had to be installed at the last minute before a papal visit in 2010. 
 
 Under an agreement announced on Thursday, the basilica will pay city authorities 36 million euros ($41 million) to help fund Barcelona’s public transport system and to revamp nearby streets, thus ending a dispute over the building’s legality. 
 
 Some of the money will also be channeled into providing direct access to the monument and expanding its current entrances, the council said in a statement. 
 
 Gaudi’s design features 18 towers dedicated to the 12 apostles, four evangelists, Jesus and the Virgin Mary and famously includes modernist and Art Nouveau as well as more traditional Gothic elements. 
 
 Sagrada Familia, which means ‘holy family’ in Spanish, is finally due to be completed in 2026, the centenary of Gaudi’s death. He was hit by a tram in 1926 when only about a quarter of his building had been completed and progress has been slow and sporadic since then, picking up pace in recent years. 
 
 Once the license is granted, a works commission including local residents will be set up to finalize the project. 
 
 ($1 = 0.8720 euros) 

 A famous Spanish church is $41 million in debt. 
 
 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 New York Times. 
 
 Get push notifications with news, articles, and more! 
 
 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 Times. 
 
 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. 

 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. 

 More than a century after its first stone was laid and 92 years after its famously ascetic architect was fatally struck by a tram, the Sagrada Familia in Barcelona is finally getting its paperwork in order. 
 
 A deal between the church’s trustees and the city council means the project, on which construction began in 1882, will be granted a building licence for the first time. 
 
 Antoni Gaudí’s unfinished masterpiece is Barcelona’s most visited tourist site, attracting 20 million visitors to the area each year. But until Thursday it had lacked the proper permissions. 
 
 The new agreement will formalise the building works and pave the way for a plan “to study the urban solutions in order to finish Antoni Gaudí’s project”, the city council said. 
 
 The deal includes schemes to improve public transport and the surrounding area. The Sagrada Familia will pay €22m (£19.3m) to help underwrite the city’s transport network, including €7m to improve accessibility on the Barcelona metro system. Four million euros will be invested in renovating four major thoroughfares and €3m will be for keeping streets safe and clean. 
 
 “The Sagrada Familia is an icon and the most visited monument in our city,” the Barcelona mayor, Ada Colau, said in a tweet. “After two years of dialogue we have made an agreement that will guarantee the payment of the licence, secure access to the monument and facilitate local life with improvements to public transport and redevelopment of the nearby streets.” 
 
 Work on the Sagrada Familia began in March 1882, based on a neo-gothic design by the architect Francisco de Paula del Villar y Lozano. When he resigned shortly afterwards, Gaudí stepped in with perhaps his most famously idiosyncratic design. 
 
 The church quickly became the life’s work of the Catalan architect. He oversaw construction between 1883 and early June 1926, when he was hit by a tram. He succumbed to his injuries three days later and was buried, fittingly, in a chapel in the Sagrada Familia’s crypt. 
 
 Gaudí’s collaborator Domènec Sugrañes took over the project, adhering to Gaudí’s original concept. During the Spanish civil war the studio workshop burned down and original plans, drawings, photographs and models were destroyed, but the work went on. 
 
 With luck it will finish in eight years’ time – the centenary of Gaudí’s death and a mere 143 years after it began. 

 Tweet with a location 
 
 You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
– 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.)