IT HAS TAKEN more than half a century, but with the dedication and public opening at noon today of the shops and restaurants in the lower floors of the Old Post Office Building, the job will be almost done. And done really well.

The fine old landmark building with its dramatic clock tower on Pennsylvania Avenue has been endangered for more than half of its 84-year existence. And despite the presence inside the building of one of the more spectacular open courtyards in the world, the structure has been effectively closed to the public from the beginning.

After the parade today, and the speeches and the ribbon-cutting, large numbers of people will get a chance to walk through any one of five entrances to the space and, finally, to see for themselves what the fighting has been all about: a soaring skylit space surrounded for 12 stories by arcaded walkways, and a place that has been made over to welcome visitors--workers, shoppers, browsers, tourists--by the thousands.

What has been achieved, against odds that seemed impossible less than 10 years ago, is a double-barreled triumph of historic preservation and adaptive reuse.

The building itself, visible from long distances as a mark of vigorous variety in the gray, classic revival office precinct of Federal Triangle, has been saved. In addition to that, it has been rejuvenated: cleaned to a sparkle inside and out and given a whole new set of uses that should help to turn the tide for Pennsylvania Avenue and the District's old downtown.

Just as planned in the late 1890s by the original architect, W.J. Edbrooke, the upper floors house government workers--a fortunate few (mainly the National Endowments of the Arts and Humanities) who have a magnificent view of the courtyard from the open hallways that surround it.

But Edbrooke had no great plan for his great interior space: he covered the ground floor with steel trusses and dull glass and made it into a post office sorting room. In the ensuing years the space was poorly used. The sorting room became a dimly lit basement storeroom and the glass skylight above the top floor was painted over in black, giving the space a rather awesome aspect, like a dank Piranesian prison improbably set in the midst of the city. Not that this mattered much. In its last, pre-restoration incarnation the space was accessible only to office workers with wallets full of federal ID cards.

It was Edbrooke's offending architectural style--thick stones, Romanesque arches and fanciful corner turrets--and the building's angled setting in relation to the diagonal of Pennsylvania Avenue that caused the Beaux Arts architects who planned the Federal Triangle to recommend its destruction, in 1929. The Depression and a world war halted that scheme. But the building's continuing state of disrepair doubtlessly emboldened planners in the 1960s to move once again to tear the place down.

The best part of the story, in retrospect, is that the uncommon good sense of a few people--aroused citizens, architects, critics, several key congressmen and high-level bureaucrats such as the late Nancy Hanks--became today's common sense. No one standing in that space today can fail to be impressed by its singularity and its vast potential. It just seems obvious--now--that preserving the building and taking advantage of its striking interior were the obvious things to do.

The most dramatic change in use, of course, is the conversion of the lower floors into a high-density retail-and-restaurant mall called the Pavilion at the Old Post Office. This strategy of restoration and dynamic conversion has by now become commonplace in old downtown areas of other cities, but it was heresy when initially proposed for the Old Post Office.

It usually does take longer to get things done in Washington. In this case it took an act of Congress (the Cooperative Use Act of 1976, allowing a mix of commerce and government business), a government-sponsored design competition (won by Arthur Cotton Moore/Associates of Washington) and significant private investment (more than $10 million in the Pavilion, by the Evans Development Company of Baltimore).

But if it took longer, and if by now the mix of boutiques, upscale fast-food emporiums and classy restaurants no longer holds much surprise--the Pavilion is Washington's equivalent of Baltimore's Harborplace--the significance of the event is not decreased. The Pavilion is the right use in the right building in the right place.

Set midway between the tourist attractions of the Mall and the old downtown business district, the Pavilion is the first serious attempt to break through the imposing wall of the Federal Triangle and to bring tourists, office workers and area residents together in a meaningful way. With any luck it will stimulate the General Services Administration to hasten its plans to further open up the Triangle, and will be a magnet pulling people downtown again.

To anyone who has seen the Old Post Office courtyard in its several manifestations, from Piranesian gloom to light-filled shell, it is exhilarating simply to watch people move about in the great space: People give it a dimension it never had before.

Much credit is due to the GSA, which, once persuaded to drop its plans to rip the old place down, became an enlightened client; to Arthur Cotton Moore, the architect who figured out why and how to open up the interior; to Benjamin Thompson and Associates of Cambridge, Mass., the architectural firm that brought a sophisticated sense of busy elegance to the design of the retail spaces; and, not least, to Robert Irwin, the artist commissioned by GSA to make a piece of public art for the building.

Irwin's work, installed last week, is a simple grid of translucent cotton panels suspended from the skylight, right down the center of the courtyard on a north-south axis. It is a contemplative work that is also strong enough to withstand the visual noise of commerce on the ground floors. From different vantage points, the scrim panels are opaque or transparent. They are like empty canvases that reflect the ever-changing light in the towering courtyard. This subtle, continuous visual commentary complements the space, and compliments it. Nothing could be more appropriate.