Property owners have a new yardstick for measuring their frustration over building permit requests that are lost in the labyrinth of local government bureaucracy.

Barcelona city hall has finally issued a work permit for the unfinished church designed by the architect Antoni Gaudí, 137 years after construction started on the Sagrada Família basilica.

The city has granted the current builders a licence that is valid until 2026. The builders think that would be enough time to finish raising the landmark Roman Catholic church’s central towers.

The basilica’s first stone was laid in 1882, but Barcelona officials said there was no record showing whether a building permit first requested in 1885 had ever been granted or rejected.

They said the city would be paid €4.6m (£4.10m) in fees under an agreement negotiated with a foundation devoted to completing and preserving the Sagrada Família.

Barcelona official Janet Sanz said the agreement between the city and the foundation had put an end to “a historical anomaly in our city”.

More than 4.5 million visitors pay €17-€38 each to tour the basilica cathedral-sized church every year. The Barcelona government estimated 20 million tourists stand outside to marvel at the bell towers; Gaudí envisioned 12 towers, one for each of Christ’s disciples, but they may never all be built.

When completed, work on one of the central towers that is expected to get done while the building permit is valid would make La Sagrada Familía the tallest religious structure in Europe at 172.5 metres (566ft) tall, according to the builders.

Barcelona has the largest concentration of buildings designed by Gaudí, whose bold aesthetic still inspires architects. A fervent Catholic, he dedicated much of his professional life to Sagrada Familía, which incorporates elements of Christian symbolism along with the organic forms often used by the architect.

Gaudí died in 1926 after being struck by a trolley when just one facade was complete. He is buried in the church crypt.

Ongoing construction work is based on the architect’s plaster models and photos and publications of his original drawings, which were destroyed in a 1930s fire, according to the Sagrada Familía foundation.