Timothy Stults, principal at University City High School, said there was ‘‘a lot of turmoil’’ in the building Friday. Students had fought the closing for months, he said.

‘‘They’re experiencing the grief process the way anybody else would,’’ he said. ‘‘It’s been a difficult time.’’

Stults acknowledged that the school is nearly empty — 500 students in a space that can hold 2,000 — and needs about $33 million in renovations. But he said recent new programs have increased attendance and achievement.

The School Reform Commission decided Thursday the high school would join the others in closing. In addition to the exodus, the rise of charter schools has cut enrollment.

Philadelphia’s 23 percent decrease in student population over the past decade is partly due to the explosive growth of charter schools, which are publicly financed but operate independently.