If you want to understand the abject failure of America, look to its libraries.

All across the country, it is libraries that have become a haven for the homeless when it is too hot or too cold to live outdoors. They offer free Internet service for families who can’t afford the vital connection, and they’re an essential educational resource for parents who can’t pay for preschool. In some cities, libraries have evolved into social service hubs, for the mentally ill, the jobless and the victims of domestic abuse.

Libraries do all of these things because our society has failed to meet the basic needs of its people.

The public library, which became an integral part of American life in the 19th century, was born of the great American idea — of a free marketplace for ideas and material goods. It was a place for bootstrap self-improvement, a temple not just of learning, but also of aspiration. Now, libraries are one of the few institutions in civic life devoted to cleaning up the mess left by this country’s tawdry refusal to care for its own, to create a viable social safety net, to cushion the fall for those left behind by Darwinian capitalism.

When Washington’s central library, named for Martin Luther King Jr., closed for renovations in 2017, it was during a building boom transforming Washington, with gentrification and new condos creating a seeming golden age for people able to afford high-end restaurants and luxury gyms. In the fall, the modernist 1972 steel-and-glass box designed by Mies van der Rohe is set to reopen, radically transformed by the Dutch architecture firm Mecanoo. There will be relatively little fanfare when it comes online again (plans for a multiday grand reopening festival have been scuttled due to the coronavirus pandemic), but the prospect of its return to active duty offers a weary and beleaguered city something in short supply: hope.

The reopening of the Martin Luther King Jr. Memorial Library is a significant triumph for the District’s public library system, which has been rebuilding or renovating its branch libraries for more than a decade. Some 23 smaller libraries throughout the city have been completely remade, with more than a half-million square feet of additional space and new services available to D.C. residents, not just in affluent neighborhoods, but the most distressed as well. But the central library building, a civic icon in the center of the city’s Penn Quarter neighborhood and a historically landmarked property, was always the main challenge, and now it has been met.

By the time it closed for renovations, the black box with floor-to-ceiling windows set in a regimented grid of I-beams was a deeply problematic building. It was the only structure in Washington designed by the great German-born modernist architect, and one of the few examples of unadulterated modernism in the nation’s capital. But its windows weren’t energy efficient, its interior spaces were dark and dirty, and, with the exception of its monumental ground-floor atrium, it offered few inspiring spaces, for reading, contemplation or community gatherings. It was built around four central shafts, which contained (and hid from obvious view) elevators and stairwells. Dun-colored brick walls gave it solidity when seen from the outside, but they continued inside as well, creating windowless corridors that subdivided the huge floor plates into dispiriting warrens of gloom.

Renovation was essential, especially as libraries moved beyond the printed book to become centers for digital connection and community engagement. The good news is that almost everything in the process went right.

In 2006, a mayoral task force recommended replacing the building, which also was plagued by elevator outages and all-too-frequent failures of the HVAC system, with a new one at the old convention center site just to the north. That rallied preservationists to the cause, and they successfully argued that this structure — one of Mies’s last buildings, and the only public library he built — deserved to be saved. But how?

When the library sought ideas in a design competition, there was concern that renovation might come at the cost of sacrificing the good things in Mies’s original design — its simplicity, order and mathematical elegance. The cost, which ultimately came in at $211 million, was steep for a city agency without its own source of revenue, or a connection to the developers whose deep pockets influence most essential civic decisions in city hall.

There were early plans to add floors, and subdivide the building into public and private uses. Some proposals called for including condos or office space. But as the project went forward, and as the city thrived economically, the renovation, guided by a strict oversight process, was deemed viable without adding commercial uses.

From the exterior, the transformation is subtle. Along G Street NW, if you look to the upper floors, you might catch sight of curious new, three-pronged lighting fixtures through the dark windows. At the street level, some of the brick base has been replaced by glass, inviting views of the two irregular but enticing monumental staircases that create a new sense of vertical connection in a rigorously horizontal building.

Along Ninth Street, an exterior brick wall has been removed, creating a connection between the street and a new ground-level cafe on the building’s north side. Not clearly visible from the street is an added pavilion space and garden atop the building, which offers stunning views of the Smithsonian’s Old Patent Office building cater-corner to Mies’s mid-century reinterpretation of its neighbor’s orderly and classical architecture.

Inside, the changes are more thoroughgoing. The main lobby looks much as it did before: a huge open space with a central information desk, an orderly array of linear ceiling lights, a colorful mural devoted to the life and legacy of the building’s namesake, and two reading rooms at either end. But the mural has been restored, the lights look new and crisp, the ceiling has been acoustically re-engineered, and a theater-like sitting space has been fitted into the longest of the walls.

Flanking the entrance to this massive lobby are the two central staircases, which lead to the basement, where new fabrication spaces include sewing machines and a tool-rental library, and to the new fifth floor, which includes access to the top level of a two-story auditorium. A double-level reading room also has been added, connecting the third and fourth floors on the east side of the structure, and many of the interior brick walls have been removed, bringing light into the core of the interior. New lighting, lower-height bookshelves and comfortable furniture throughout make the library far more open and inviting.

The transformation is miraculous. Some early design proposals led to the nagging worry that the finished building might feel a bit like a Mies shell wrapped around a collection of trendy, soon-to-be-dated design follies. Architect Francine Houben, creative director of Mecanoo, which has developed a specialty in renovating and building libraries, clearly delineates her additions from Mies’s original: If it has curves, it’s Houben; if it’s a grid, it’s Mies. Yet many of most important changes feel as if they’ve been there all along. That includes stairwells lighted from above, stronger visual connections along the east-west axis of the structure, and the removal of an underground parking ramp to create space for a cafe.

“When I entered the building, it was dirty, dark, unpleasant, the ventilation was horrible, a kind of negative space,” Houben says by video call from the Netherlands.

But, she says, “I am an optimistic person, I could see it had really strong bones. The amazing thing about this Mies van der Rohe building is [that] it is not a lot of construction. The whole middle part could be an open space, and that is what I hope you experience. It is a very open, flat floor building, and that spaciousness of the building has a lot of potential.”

The essential thing about the original design was its promise to the city, its architectural echo of what King called the “promissory note,” the unpaid but still-owed bill that America owed its African American citizens after centuries of slavery, racism and oppression. Mies’s architecture may not have referenced that idea overtly — the building was only named for King in 1971, about two years after Mies died — but it dramatized the idea of promise and organic reformation within democratic society. Its open fields of glass at the ground level, which gave views to acres of book shelves, and its grid-like exterior, which suggested the basic X- and Y-axes of every possible thought, action and motion through space, said one thing very clearly: The Enlightenment isn’t dead.

The Enlightenment, however, was problematic, and encompassed vast quantities of hypocrisy in its often smug embrace. So, too, many of the ideals of mid-century modern architecture, which often seemed designed for beings more perfect than mere humans, to whom it offered a cold and steely embrace.

In the past four months, I have lost much of the dwindling love I had for both modernism and the great Anglo-American fantasy of functioning democracy. We are governed by crooks and charlatans, whose rise seems not an aberration of the lingering legacy of the 18th and 19th centuries, but a direct result of Enlightenment fantasies of communication and circulation fused to capitalist greed and intellectual cynicism.

Libraries sprung up in America more than a century ago, purposed by the winners of the capitalist rat race to fit us ordinary mortals to better service of the nation-state, though they evolved into some of the most welcoming institutions of contemporary civic life. And now democratically governed nation-states like the United States are failing in the most basic ways. We cannot keep our people safe, and we have failed to educate them sufficiently to recognize their peril.

Even as this failure was creeping up on us over the past 40 years — as we abandoned the poor and the homeless, as we dissolved the last duties of corporate America to the well-being of the people from whom it derives its existence, its labor and its profits — libraries were stepping into the yawning social void. Now the failure rushes to its dismal conclusion, and still they serve.

At some point in the coming weeks or months, one such library will reopen, better than it was and full of the old promise, and it can’t happen soon enough. Of all the buildings in America, from shopping malls to airports to the marble mausoleums that house the remains of self-governance, few are more urgently needed than this memorial to the martyred prophet of possibilities it seems we may have irrevocably squandered.