Fourteen years after going up, a sidewalk shed in Harlem has finally come down.

Dismantled Oct. 5 to the great joy of area residents, the shed was one of thousands of ugly steel-and-wood structures that pop up when a building needs façade work—whether the work happens or not.

The shed, at the corner of West 123rd Street and Lenox Avenue, blighted an otherwise pristine Mount Morris Park Historic District street. Garbage piled up on its roof. Loiterers often lurked in the shadows below.

Laurent Delly, who has lived next to the shed for years, said, "Residents have witnessed Sodom and Gomorrah underneath the scaffold."

Delly's relief is shared by Ashraf Muhammad, business manager at the property's owner, Zamzam Realty, who said neighbors used to scream at him when he visited the site—where work began the same year Friends went off the air and The Apprentice went on.

"We hope for a clean restart," Muhammad said.

In the end, it cost less than $60,000 to fix the façade at 260 Lenox Ave., a 4-story building constructed in 1910. But the landlord paid about $700,000 in fines for project-related violations, including a stop-work order after a Buildings Department inspector found construction tools were used without a permit. The building's location on a landmarked street caused further complications.

"It wasn't the work that took time so much as the approvals," Muhummad said.

But bureacratic red-tape wasn't the only issue. Last year the city ordered Zamzam and its president, Muhammad Shahid, to appear in criminal court for building-code violations and keeping up a shed without a valid permit. That nudge helped get the lengthy renovation project moving.

A Buildings Department spokesman said: "Property owners have a legal responsibility to keep their buildings in a safe condition, for the protection of all New Yorkers. We are pleased that the building owner has finally decided to honor that responsibility and make the necessary repairs to their building."

But so long as landlords have a permit, there is no limit on how long their shed can stand.

About 8,000 sidewalk sheds cover 300 miles of city sidewalks, clogging pedestrian traffic and entombing small businesses with an assortment of steel beams and plywood panels. The oldest shed in the city has stood at the corner of West 115th and Lenox since 1990, according to residents and city records.

Some building owners are spending money for nicer-looking sheds outside hotels, office buildings or restaurants, but most make do with structures whose design hasn't changed since the 1950s.

The shed scourge exists thanks in part to the robust economy, which sparked a boom in new construction and renovations.

But more important is the city law passed in 1980 requiring owners of buildings higher than 6 stories to inspect their properties' street-facing façades every five years. Anyone needing work had to get a shed.

Over the years the law has been broadened to include inspections of side and rear façades, and in 2013 the checklist grew again after a 35-year-old woman was killed when a balcony railing collapsed.

The ever-expanding set of laws is manna from heaven for shed builders. Today building owners collectively pay as much as $400 million annually for street-level sheds and $800 million for the scaffolding that sits atop them, according to industry officials.

Some sheds stick around for a long time because it is cheaper for building owners to hoist one up than do repairs. Once a shed goes up, it can't come down until the city signs off. A Buildings Department examination in 2016 found about 2,000 dormant sheds, meaning they stand in front of buildings with a façade that poses a safety hazard but where no repair work is underway.

Even when the landlord can afford repairs, ostensibly temporary sheds can become permanent—like the one that has surrounded the Buildings Department headquarters at 280 Broadway since 2008. The job, which involves repairing a landmarked building with a facade of Tuckahoe marble, is expected to be completed next year.

Meanwhile, any rejoicing on West 123rd Street might be premature. Although the building's façade is finally fixed, the interior needs about a year's worth of renovation. Another dreaded shed could be going up.

"Our contractors and architects will decide," Muhammad said. "It's not up to me."

Hearing that, Delly struggled to contain his emotions. "Oh, my God," he moaned.