Portable classrooms sprang up, theaters were converted into learning centers and some school cafeterias fed 1,000 students at a time as school officials in Montgomery and Fairfax counties scrambled to meet a surprising problem that came with the new school year: overcrowding.

By the end of last week, classroom sizes seemed to have come down to almost the norm, but adjustments in busing routes and teacher assignments were still being hammered out.

Reversing a decade-long trend of dropping enrollments and school closures, both systems reported that the decline is over and that, in some schools, the number of students is pushing building capacities over the limit. In Arlington, the enrollment has risen also, while Prince George's County and the District report that the rate of decline in enrollments has slackened.

New housing, the mini-baby boom and an increase in public confidence in schools is what school officials attribute to the enrollment shift.

"We've been hesitant to say this decline in decreasing enrollments is happening but I'm glad to say it's leveling off," said James Akins, executive assistant for research, planning and evaluation for Alexandria City Public Schools. "Its good news for schools and the community in general."

School closings have marked the last decade in the greater Washington area. In the past three years, 30 schools were closed in Montgomery County alone. This year the completion of new town house units and single-family homes in Montgomery mean surprisingly high enrollments: Where 769 more students than expected enrolled, 358 of those were in kindergarten.

"They're coming out of the woodwork," said Harry Pitt, deputy superintendent of schools.

At Springbrook High School in Silver Spring last week, students ate lunch in four shifts and hallways were like the metro at rush hour. Some students reported having to share laps on school buses and an additional counseling office was under construction to accommodate the 60-100 unexpected students who needed orientation counseling and scheduling.

In Fairfax County's Robinson High School, the cafeteria, the recital hall and theater all double as classrooms, and in Germantown in Montgomery County about 270 Fox Chapel Elementary School students have been moved into 10 portable classrooms -- "a second school," as one school official said -- to accomodate the unexpected number of kindergarten students.

The increase in student enrollment is the greatest in northern Montgomery County, western Fairfax County and south and central Arlington County where new housing development has occurred. "This is the last frontier in the county," said Bob Leggat, associate principal at Robinson High School, referring to the southwest and northwest sections of the county. "We just can't accomodate" the growth.

Montgomery County hired an additional 272 teachers before school started. Forty portable classrooms were constructed, and the school system added five new buses.

At Robinson, the school is 615 students over building code capacity, 402 new lockers have been ordered, and, with more than 5,000 students and staff eating in the cafeteria each day, some students take lunch in the middle of a class period. Another high school in the county, Lake Braddock, is facing the same overcrowding.

Montgomery Blair High School in Silver Spring, a magnet school important to the school district's desegregation plans, has 106 students more than were projected for it. Walt Whitman High School in Bethesda, whose enrollment has been predictable until now, partly due to enrollment in private schools in the area, reported 60 to 70 unexpected students.

"It could be that parents see the schools have improved and they think there is more stability after the school closures" have been completed, said George Fisher, school system demographer in Montgomery County. Cramped parking lots, shoulder-to-shoulder lunch tables and slightly overcrowded classrooms will be part of a student's day at several of these schools from now on. School administrators say students have adjusted well, although students at Springbrook were not quite as gracious.

"As soon as you walk in the door, all you see is heads," said 11th grader Keesha Annette Johnson as she finished her lunch in the cafeteria. "You have 10 minutes to eat and there are lines out the door."

To the students, the social scene has been disrupted the most at Springbrook. "You can't see around you in the halls," said 17-year-old Gail Riseberg. "And it takes so long to find your friends."

Enrollment figures from other jurisdictions in the area indicate, if not an increase in students, at least a slowing of the decline that has characterized schools for the past decade. With unofficial figures in from the first week of classes, and changes expected until the end of September, enrollment in the major jurisdictions in the area was as follows:

Alexandria City Public Schools reported 10,179 students attending classes, down from last year by 134 but over projections by 100 and expected to increase slightly. Eighty-five more kindergarteners than expected enrolled.

Arlington County schools enrolled 14,555 students, up by 120 over last year.

Fairfax County recorded 122,705 students, up by more than 200 over last year and expected to grow by 1,800 more by the end of September.

Prince George's County reported 104,725 students enrolled, a drop of more than 3,000 but expected to climb another 1,000 by the end of the month.

Montgomery County reported attendance at 91,635, up by 416 from last year and 769 over the county's projections.

No comparable figures were available in the District, but a school system spokeswoman said enrollment is close to the 88,500 forecast, a drop of nearly 1,000 from last year, but a indication that the decline in enrollment has slackened from the past five years when the District lost 5,000 students a year.