Virginia officials, bowing to a public outcry over provisions in a proposed building maintenance code, tentatively have agreed to ban lead-based paints and to require landlords to remove trash, exterminate rats and maintain the grounds around their buildings.

Although the Virginia Board of Housing and Community Development did not adopt any final standards, officials said yesterday the agency has reached a consensus to restore a variety of deleted requirements to the building maintenance code. The proposal now goes to Gov. Charles S. Robb and the state attorney general's office for review.

Northern Virginia and Tidewater government officials had charged that a previous draft code under consideration by the board would have gutted local maintenance codes by relieving landlords of responsibility for doing anything beyond maintaining the physical structure of their buildings.

"I'm elated," said William Pennill, Alexandria's director of code enforcement. The board's reversal will enable localities to retain "our ability to enforce minimum housing and hygiene standards," he said.

If adopted, the guidelines will establish the first statewide building maintenance codes in Virginia, where localities now may set their own standards.

The proposal would fix maximum standards that localities could enforce. Only with the specific approval of the Virginia legislature could any locality enact more stringent maintenance laws.

The previous draft code under consideration by the nine-member board -- of which four members are connected with the building industry -- drew harsh criticism from officials in populous areas of the state.

"We were very concerned about the adverse publicity," said board member James W. Roncaglione, a Northern Virginia industrialist. "We wanted to be fair to all the constituencies in Virginia."

State housing officials had drawn that draft by deleting key portions of a model code recommended by the Building Officials and Code Administrators International Inc., a national group that annually recommends revisions in building codes.

The officials had deleted from the model code a number of provisions aimed at protecting housing residents, particularly renters, and designed to ensure safety standards in and around buildings. The deletions were seen as favoring rural areas of the state, where regulations are more lax than those in urban areas such as Northern Virginia and Tidewater.

The housing officials had discarded requirements that landlords control rats and other pests, provide screens for windows, remove trash from buildings and provide garbage bags.

Also, the officials had deleted provisions limiting the number of people in a residence, barring the use of lead-based paints and prohibiting open fires and abandoned cars near houses.

In a meeting Monday in Richmond, however, the housing board made a tentative decision to restore all of those provisions to the code, making it almost identical to the model code advanced by the Building Officials and Code Administrators International.

"The board broadened the scope of what we originally considered to be building regulations," said Neal J. Barber, acting director of the Virginia Department of Housing and Community Development.

Barber described the consensus as "a change in direction" and a "strong indication" that the board will adopt a stringent maintenance code in final consideration this fall.

Several housing board members cautioned, however, that the state attorney general could recommend against some of the code's provisions as too sweeping under Virginia law.

Some board members stressed that despite the consensus reached Monday, the board will be free to change its position after the governor and attorney general review the code.

"My mind is still open," said J.B. Hall Jr., a board member and executive vice president of the Home Builders Association of Virginia.

Donald R. Slatton, executive vice president of the Apartment and Office Building Association of Metropolitan Washington, declined to take a position on the code as now proposed but said he disliked provisions that were overly specific.

"We are concerned about the health, safety and welfare of people in rental housing," he said, "but we're also concerned about keeping maintenance costs as low as possible consistent with proper maintenance."