When D.C. officials temporarily opened the District Building to the homeless during last week's bitter cold weather, the compassionate move made national news. Mayor Marion Barry stood before television cameras last Tuesday and said, "While it's cold, a warm building is better than a grate."

Behind the scenes, however, the move came close to creating a public relations nightmare because city officials, citing logistical problems, later told advocates for the homeless that the building would be open only one night.

Advocate for the homeless Mitch Snyder threatened promptly to "march on the District Building" in protest the next day, according to one city official. Barry then ordered aides to keep the building open two more nights -- long enough to indicate that the symbolic move to help the homeless was also meaningful.

"There are people over at {the Department of Human Services} who are very new to this city and don't {understand} . . . . The mayor understands," Snyder said yesterday when asked about the incident. "The mayor ordered that the District Building be reopened" to the homeless.

Aides to the mayor confirmed yesterday that some officials were concerned that the crowd of homeless people -- about 50 to 60 each night -- had created access problems for the officials who use the building. The District Building houses the mayor's office, the D.C. Council and other high-level city offices.

"There were some concerns raised about the continued use of the building," said John C. White, the mayor's press secretary, "but the mayor overrode that because the mayor thought it was important . . . that the homeless were afforded shelter at the seat of government."

Donald Streeter, a human services official, said yesterday that the District Building has not been used for the homeless since Thursday and likely would not be used again unless no other public buildings were available.

Homeless persons and families who cannot get into the city's regular shelters, which often are full, are being taken to the Randall School at First and I streets SW, a converted school building used for government offices that can accommodate up to 200 persons, Streeter said.

A bus has been stationed outside the District Building from 5 p.m. until 1 a.m. each night to take homeless people to other shelters.

"The idea {was} that no one public building would take the full brunt," said Dwight S. Cropp, director of intergovernmental relations. "It was understood that the District Building couldn't be used continuously because of all the activities that occur there."

Barry opened the public buildings to the homeless after the council enacted emergency legislation introduced by Council Chairman David A. Clarke, who had proposed that the city use the expansive D.C. Armory near RFK Stadium. Although Barry and his aides had initially been critical of Clarke's idea, they moved quickly to have the mayor sign the bill and then take credit for opening up the city's principal public building.

"Politics is all symbols," Snyder said yesterday. "Some would say it's nothing but {symbols} . . . but {the District Building} is a very important symbol."