The D.C. school board agreed yesterday to close seven schools over the next three years, the largest such move in more than a decade and one that indicates how much the city's enrollment has dwindled.

Five of the 12 schools that D.C. School Superintendent Andrew E. Jenkins proposed for closing were spared during the board's session, which lasted about five hours and at times provoked combative, impassioned debate.

School officials had hoped to save about $7 million annually by closing 12 schools, but yesterday's action will lower that figure substantially. It also ends, at least temporarily, months of rancorous debate across the city about the closings -- which raised questions of race, class and equity in schools.

As part of the board's vote, which has been widely viewed by civic leaders as a test of the school system's pledge to reform, four schools will close permanently this summer.

They are: Hamilton Junior High in Trinidad, Bryan and Giddings elementaries on Capitol Hill, and Carver Elementary in Deanwood.

Langston Elementary in Shaw and Petworth Elementary in Petworth will be closed in June 1991. Garnet-Patterson Junior High in Shaw will close in June 1992.

Five schools will stay open: Evans Junior High in Lincoln Heights, Gibbs and Goding elementaries on Capitol Hill, Wilkinson Elementary in Congress Heights, and Woodridge Elementary in Woodridge. But the board voted to examine whether other schools near Gibbs and Goding should be merged next summer.

Yesterday's vote was the first time since 1982 that the board considered closing several schools at once.

The board's move becomes the latest signpost of a student exodus from D.C. schools that began nearly two decades ago.

Suburban school districts, meanwhile, are reporting overall enrollment gains.

Afterward, Jenkins and most board members said they were satisfied with their decision. The 12 schools Jenkins chose from a roster of 175 for closing were either at least half-empty or dilapidated.

"The board has wrestled with this issue a lot more responsibly than it has in the past," said board member R. David Hall (Ward 2). "Some buildings are still open, but we've done what we had to do."

Jenkins, who unveiled the closings proposal in February, applauded board members for approving the majority of his recommendations. He also said he did not mind that the board gave some schools a year to close.

"This is more than we have closed in a long time," Jenkins said.

Some board members, though, said the vote displayed the board's weakness amid community pressure and politics; five seats on the 11-member board are up for election this fall. Some parent leaders, meanwhile, showed concern that perhaps the board did not go far enough.

"I don't know how to interpret this," said Delabian Rice-Thurston, executive director of Parents United, the city's largest education advocacy group.

"Once you start giving delays, that could snowball. But my hope is parents will see this as an opportunity to develop better education programs at the schools where their children will transfer."

During yesterday's debate, some board members also expressed suspicion that votes to delay closing a school could give community activists a chance to fight to keep it open.

At times, reactions of parents crowded inside the board's chambers to watch the vote supported that opinion.

When the board decided to delay closing Langston Elementary, whose 73 students could attend a school across the street or one three blocks away, parents in the audience erupted in cheers. There was also applause after Petworth and Garnet-Patterson were granted more time.

"This is a copout," said R. Calvin Lockridge (Ward 8), referring to the board decisions. "It's another example of how the board plays political games."

The board's vote followed 10 community hearings on the closings, which were first proposed last summer by a panel of civic leaders who studied the school system. That group concluded the system was wasting millions of dollars each year operating schools it did not need, and Jenkins agreed.

In the next few months, the board will consider 17 other school sites that Jenkins included for study on his closings list. It also voted yesterday to add Moten Elementary in Congress Heights to that list.