Apart from prisons, few Philadelphia buildings are more joyless than the headhouses found along the eastern section of SEPTA’s Market-Frankford Line. These small structures enclose the staircases that take you, in one straight, vertigo-inducing run, from street level to the train platforms. The dull metal panels and tiles used on the exteriors were clearly chosen for easy cleaning, and yet they always seem to be streaked with grime.

The architecture of the Market-Frankford El (as most Philadelphians call it) wasn’t always so utilitarian. When the elevated line was completed in the 1920s, the eastern segment was dotted with Gothic-style headhouses that would have looked at home on a leafy, early 20th century college campus. But when SEPTA began reconstructing the El’s steel viaduct in the 1990s, all the small, distinctive Gothic headhouses between the two main terminals were demolished.

Except for one.

The sole survivor is a small jewel box of a building located on the eastbound side of the Tioga station, in the Harrowgate neighborhood. The eight-sided headhouse, which opened in 1922, is just slightly taller than the neighboring rowhouses, but its unusual tapered shape and rich details accentuate its verticality. Think of it as a miniature version of the Gothic skyscrapers popular in the 1920s — such as the Rittenhouse Plaza on Walnut Street or the Beury Building on North Broad. Two rounded finials, resembling Mickey Mouse ears, crown the top.

Part of what makes the design so impressive is the elegant efficiency of the interior. Despite a footprint not much bigger than a typical rowhouse living room, the little building feels airy and open. You enter through a stone portal, capped by a sculpted eagle. Unlike the daunting, straight-run staircases in several of SEPTA’s modern headhouses, the architects softened the climb by wrapping the stairs around a central atrium, allowing a landing to be inserted midway up. Daylight pours in through massive Tudor-style windows, the kind often seen in old college libraries.

Who designed this remarkable little building? No architect is credited on the surviving architectural plans, but it seems likely that the headhouse was the work of an in-house city architect. Although the western portion of the El was initiated by Philadelphia Rapid Transit Co. in 1903, the Department of City Transit assumed responsibility for extending the viaduct from Center City to Frankford. As part of its contribution to the system, the city also built the station buildings. Work began on the eastern extension in 1915. According to a SEPTA official, the same octagonal headhouse design was used for all the stations between Spring Garden and Frankford.

Most headhouses along that stretch are built on small sites and cling tightly to the edge of the viaduct. That makes it difficult to see them as individual buildings. But because the Tioga headhouse is in a corner of Harrowgate Park (the neighborhood park that gives this corner of the city its name), it can be seen in the round. It seems likely that its visibility is the reason SEPTA decided to spare the building during the reconstruction of the El. A modern headhouse was built on the westbound side.

The rebuilding of the El was one of Philadelphia’s signature infrastructure projects of the 1990s. SEPTA spent almost $500 million to reconstruct the steel viaduct that connects the 69th Street Station in Upper Darby with the Frankford Transportation Center. The original, early 20th century structure was narrowed to allow more daylight to reach the streets below. Modern headhouses with elevators were installed at every stop, finally making the 14-mile route accessible to all. Because of their size, the original headhouses at the Frankford and 69th Street stations were also preserved.

Perhaps because the replacement headhouses along the eastern portion were built first, their designs are far inferior to the later headhouses in West Philadelphia. Those stations were constructed on larger sites and the buildings tend to have more architectural heft. Even though SEPTA spared the old Tioga headhouse, it installed heavy-handed security gates in front of the entrances, obscuring the handsome stone portal, during a renovation last year. At least the renovations included new lights, allowing you to admire the sculpted columns. It’s too bad that the headhouse can now be used only as an exit.

Despite SEPTA’s institutional aesthetic, the Market-Frankford Line has proved to be the great workhorse of Philadelphia’s transit system. The transit line, which provides direct service between the Riverward neighborhoods and the job clusters in Center City and University City, has powered the development and gentrification of those former working-class neighborhoods. That construction is now starting to reach Harrowgate.

Philadelphia has a long history of discarding its great transit architecture. Two stunning train stations designed by Frank Furness — the Broad Street Station and the Baltimore and Ohio Station on Chestnut Street — were also unceremoniously demolished in the mid-20th century. That makes the survival of the tiny Tioga headhouse all the more miraculous. Small as it is, it proves that public transit is capable of lofty architectural ambitions.