With its two distinctive towers and its long boatlike shape, the new United States Embassy here, to be dedicated next week by President Clinton, is the most diplomatic of buildings--a fine work of architecture that represents the nation with dignity and tact.

Under ordinary circumstances, this would be cause for modest applause. In presenting your country to foreign lands, it is customary and desirable to make a good impression. But in this era of terrorist targeting of U.S. embassies around the world, the achievement merits a standing ovation.

It did not come easily. The new, $40 million embassy was nearly 20 years in the making. In response to pendulum swings in Washington concerning how to respond to terrorism, almost everything about the building--the location and each facet of the function and design--was considered, reconsidered, changed, changed again and, sometimes, changed back.

Fortunately, the pendulum was swinging in the right direction when final choices were made. The embassy did not turn out to be a dressed-up bunker in a walled compound somewhere outside of town. This was a very real possibility back in the '80s, in the aftermath of the 1983 bombing of our Beirut embassy and other atrocities.

Instead, the building became a compromise between the ideal of representing the openness of American democracy and the need to increase security for the people who do the representing--a rather graceful compromise, in an extraordinary setting.

The embassy stands on a choice piece of symbolic real estate in Ottawa, framed on two sides by streets that are part of Canada's national ceremonial route. Within clear view across a stretch of green is the dramatic promontory of Parliament Hill and its impressive crown of Victorian Gothic government buildings.

This splendid site was agreed upon with Canadian authorities in the early '80s. A building was designed for it by a Boston firm, but both site and design were dropped after 1983, and a long search commenced for an alternative location, distant from Ottawa's center. Eventually, the sensible decision was made to return to the original, central location. As he has done so often where good architecture and good sense are concerned, Sen. Daniel Patrick Moynihan (D-N.Y.) stepped in to help sway the choice.

Moynihan and others argued that the site reflects the importance and friendliness of relations with our neighbor to the north. Proponents also pointed out parallels with the honorific setting of the Canadian Embassy in Washington, which opened in 1988 on Pennsylvania Avenue at Fourth Street NW, with superb views of the U.S. Capitol.

David Childs, of the New York firm of Skidmore, Owings & Merrill and chief architect (with Gary Haney) of the embassy, says similarities between the two cities very much influenced the design. In both, he observes, distinctions between "the local and the national" are evident in changes of pattern and scale--street widths, building sizes, open spaces and so on.

The long, narrow embassy site in Ottawa, in particular, faces the "local" city to the east, in the form of the 19th- and early-20th-century commercial buildings of the Byward Market neighborhood. To the west it looks upon the definitively "national" scene of Parliament Hill. The Janus-faced design, with a long glass-curtain wall facing west and a masonry facade with conventional windows facing east, adroitly accommodates the two very different contexts.

But that gets us slightly ahead of the story, for this was not the first of Skidmore, Owings & Merrill's designs. Childs, not incidentally, used to head the firm's Washington office and served as chairman of our National Capital Planning Commission. In Ottawa he had to present his design to the National Capital Commission, the Canadian equivalent of the Washington agency he once headed.

He did so on April 19, 1995, the very day that bombs destroyed the Alfred P. Murrah federal building in Oklahoma City. "There was applause at the end of the presentation," Childs recalls wistfully, and then came the horrible news. It was back to the drawing boards.

Childs, Haney and company had been allowed quite a bit of leeway from the "Inman standards," named after retired Adm. Bobby R. Inman, who had headed a panel on embassy security after Beirut. Their design, for instance, exceeded the requisite window-to-wall ratio of 15 percent. The west wall facing Parliament Hill was a long curve of floor-to-ceiling glass, behind which was a public-spirited atrium.

In the redesign, the architects eliminated the perimeter atrium, greatly reduced the amount of window glass and made other security-related adjustments. Ironically, as sometimes happens, the enforced redesign was in certain respects an improvement over the original. The new interior arrangement, with perimeter offices divided by a long, high, spinelike central atrium, better suits current State Department staffing requirements.

The main thing, however, is that the site was not abandoned, although it provides nowhere near the 100-foot minimum setbacks from the street that are high on the Inman list. This requirement dictates suburban or exurban embassy locations and pretty much guarantees the construction of walled compounds. By contrast, in-city locations such as this one provide architects a chance to design buildings with genuine civic presence. (And, some would say, give diplomats the chance to be diplomats.)

There are tricks involved. The embassy is built like a bunker, though doesn't look like one. It is a fortress, yet manages to be somewhat welcoming. Although it is sensitive to two dramatically different urban contexts, it remains identifiable as a special structure.

There are some concrete walls that are four feet thick. Cleverly enclosed vestibules make the entryways as secure as those of a maximum-security prison. The perimeter fence with its tall steel spikes is pretty--but very strong. Outside the fence, the building is surrounded by deeply entrenched steel bollards (added to the design after the most recent round of terrorist attacks). Blast-resistant glass windows, as thick as fists, are anchored in structural steel and concrete.

That huge glass wall on the west side is perhaps the primary instance of architectural sleight of hand. It harks back to the post-World War II years when U.S. embassies were designed with glass walls to be both literally and symbolically open. Yet in Ottawa the function is almost entirely symbolic; behind the thick glass, for the most part, is a solid wall with the small windows.

Inside, the design is all of a piece. Unfortunately, not many non-employees will get to see it. But, in any case, the atrium was conceived and detailed with extreme care and finesse. Circumnavigated by cantilevered corridors, with a metal sheathed dome in the middle and striking stairwells at each end, it is a remarkably distinguished "public" room.

The symbolism of an embassy with two distinct faces doubtless will be the subject of jokes about the honesty of the diplomatic trade. As an architectural strategy, the facades--one stone, one glass; one closed, one "open"; one old-fashioned, one contemporary--are mindful of Childs's years in the District, when he was a leader in the Washington school of responsive, contextual design.

Although the design may be a bit dated (Childs himself says he would do it differently now), it isn't nearly as broken up as verbal descriptions make it seem. For one thing, the curving shape of the ribbed, gray metal roof that rises behind and extends beyond the glass facade gives a certain dramatic unity to the design. So, too, does the central tower, a heavy, metal-sheathed pyramidal form--it is the "smokestack" of the "boat." (A second tower, a glass-and-steel appendage on the building's northern end, is a bit disruptive. Lit from inside, it will be nice at night.)

Then, too, like many of the best Washington buildings by Childs and others, this one was designed with a civic spirit. This civility, this desire to fit in without being obsequious or sly, is indeed a finely balanced approach to embassy design. With our embassy-building program in disarray, there is much to learn from this excellent building in the heart of Ottawa.