The ground floor of the District Building was opened to the homeless late yesterday after the D.C. Council unanimously passed emergency legislation authorizing Mayor Marion Barry to use certain public buildings as shelters when temperatures fall to 25 degrees or below.

In addition to the District Building, officials said the Randall School building, which houses government offices near First and I streets SW, will be used.

The council, reacting to the shortage of shelter space, plummeting temperatures and the death of one homeless person during the weekend, asked the mayor to use such sites as the D.C. Armory, RFK Stadium, the Washington Convention Center and other "appropriate space" to house the homeless between 6 p.m. and 6 a.m. during frigid weather conditions.

Barry, who quickly signed the measure, designated the District Building and Randall building. "While it is cold, a warm building is better than a grate," he said.

The council's action is similar to measures taken in other cities throughout the country.

Last year, Los Angeles opened its City Hall to the homeless and such cities as Philadelphia, Chicago and New York have used public buildings as shelters for the homeless, according to a spokeswoman for the National Coalition for the Homeless.

D.C. Council Chairman David A. Clarke, who yesterday introduced the temporary legislation, which will remain in effect for 90 days, said it was needed to deal with the

shortage of public and private shelter space for the estimated 6,400 homeless people in the city.

Clarke said the Interfaith Conference of Metropolitan Washington and the United Way estimate there are 1,700 shelter beds for single men and women in the city. In addition, he said, the highest estimate of shelter beds for homeless families is about 500.

"There are therefore many, many homeless persons in our city for whom there is no housing of any type," said Clarke, adding that he visited a shelter about 2:30 a.m. yesterday that held nearly twice its 138-person capacity.

With temperatures well below freezing last night, he said the city needed to provide "at least a place for the homeless to seek protection from the cold."

Most council members agreed, though Nadine P. Winter (D-Ward 6) voiced concern that merely opening a warm building to the homeless without providing additional social services may not be enough. Winter, in whose ward the armory and RFK Stadium are located, said that Clarke had called her at midnight to discuss the legislation and that she had not had adequate time to study it.

Clarke apparently had worked through the night on the legislation, which resembled a 1983 request by council member John A. Wilson (D-Ward 2) that the mayor use the armory as a shelter.

Wilson said his request was turned down because of security concerns about the weapons kept at the facility.

Barry said yesterday that armory officials recently expressed some reservations about the use of the armory for that reason.

But yesterday the council and the mayor seemed inclined to consider the armory, and other sites, as potential shelter space. Wilson, referring to a recent increase in media attention to the homeless, said passage of the temporary legislation shows that "nobody pays attention to the situation unless it's politically advantageous to pay attention."

Council member Jim Nathanson (D-Ward 3) said, "The question is simply, 'Are we going to let people freeze?' "

Mitch Snyder, an advocate for the homeless, praised the council action, saying, "As the temperature drops, everybody's sense of urgency increases."

Last night city officials set up about 50 cots, donated by the National Guard, on the ground floor of the District Building and 100 cots at the Randall School. Officials said soup, coffee and sandwiches, donated by churches, will be provided.

Ernest Taylor, director of the Office of Emergency Shelter and Support Services, said two agency vans will transport homeless persons to Randall School and the District Building if other shelter facilities are filled to capacity.

"Tonight will determine if we need to continue this in the District Building," he said.

At the District Building just before 9 p.m., the mayor and Snyder toured the ground floor sleeping area, where the National Guard cots had been set up.

Nearly 50 people had been helped early in the evening, but some left after being given a hot meal.

Barry sampled a bowl of steaming beef stew provided by volunteers from the National Church of God and talked with Snyder about getting suburban jurisdictions to do more to provide shelter for the homeless.

The suburbs "are slowly beginning to realize they have homeless people," Snyder said.

"If they are not going to provide shelter, they should help pay" for facilities and services in Washington.

Barry said he will take the issue before the regional Council of Governments.

By 9:30 p.m., the makeshift beds in the District Building were full. Officials said 57 men were brought to the building from a variety of shelters in the city and, in a few cases, from the streets.

Room for an additional 200 people was provided by opening a part of Snyder's shelter at Second and D streets NW that had been under renovation.

"Under emergency conditions like this, we figured that we had to do it," Snyder said.

The District Building houses the offices of the mayor and the council, the Office of Elections and Ethics, the budget office, the business and economic development office and several other executive branch units.

None of the city's largest agencies is located there, however.

In other action yesterday, the council gave preliminary approval to a measure that would require restaurants with seating capacities greater than 50 to establish nonsmoking sections.

Nightclubs and taverns, and bar and lounge areas in restaurants are excluded.

The council also gave preliminary approval to a bill that would require bicycle couriers to complete a training program, pass a safety test and pay up to $50 a year for a license.

In addition, the council gave approval on first reading to a measure that would require the mayor to establish municipal parking facilities throughout the city. The bill would create a 13-member committee, appointed by the mayor and the council, to advise where the parking should be.

The council excluded the downtown area from the legislation, prompting Winter to say that big business will continue to control parking lots downtown.

Staff writer Rene Sanchez contributed to this report.