First, the Philadelphia Board of Education voted 7-2 Thursday night to mandate metal detectors in all city high schools.

Then, in an explosive twist, activists — including students — shut the meeting down.

“We do not recognize your vote, we do not recognize your legitimacy," Julien Terrell, executive director of the Philadelphia Student Union, a youth organizing group, shouted over board president Joyce Wilkerson. Wilkerson tried to continue the meeting, but Terrell persisted, while several school district and city police officers stood around him. After several minutes, and after Terrell had used profanity, Wilkerson recessed the meeting, leading the board out of the room.

“Whose schools? Our schools!” the crowd chanted.

It was by far the sharpest rebuke of the board since the district was returned to local control July 1, and perhaps the wildest meeting of any Philadelphia School District governing body since the SRC voted to shut two dozen schools in 2013. Arrests were made then. On Thursday night, despite heavy police presence, no one was arrested.

Still, it seemed that the board’s honeymoon is over.

After the board left the room, members of the Philadelphia Student Union and the Caucus of Working Educators, an activist group of city teachers, then moved behind the school board dais, declaring themselves “the people’s school board.”

They invited speakers, and reiterated Terrell’s points — that they were disgusted with a governing body that promised to be different from the old School Reform Commission.

“This is how they treat us — they say no, and then they walk away,” said Charles Mitchell, a student at The Workshop School. “They don’t care.”

All but three of the Philadelphia School District’s 49 high schools currently use metal detectors; three have them but do not use them. One of the three — the highly regarded magnet school Science Leadership Academy — is about to move into Benjamin Franklin High School, a neighborhood school that uses the security checkpoints, and the officials said they needed to create a standard experience.

Metal detectors make students feel like “criminals waiting to happen, and not just kids," said Nayeli Perez, a student at the Academy at Palumbo, a high school that uses detectors.

Board members Angela McIver and Mallory Fix Lopez opposed the policy; Fix Lopez said metal detectors create a distrust among students, which affects their mental health and ultimately their academic achievement.

Nonvoting student board members Julia Frank and Alfredo Praticò said they were against metal detectors, but said they spoke with many students who said security checkpoints were necessary for safety.

After the disruption and recess, the board moved to a conference room and reconvened, voting on the rest of its agenda, including adopting the broad outlines of a $3.4 billion 2019-20 budget, Wilkerson said.

Late Thursday night, activists including the Alliance for Philadelphia Public Schools said they believed the votes were taken illegally, in violation of the Sunshine Act.

Because of the disruption “we were legally entitled to conclude the meeting,” Wilkerson said. The board live-streamed its proceedings over the internet, and will invite speakers who did not get a chance to finish testimony to do so in April.

“This is a board of education that has put an emphasis on public participation; it means a lot to us,” said Wilkerson after the private session adjourned. “We need for that dialogue to be mutually respectful. When that wasn’t possible, we still had the business of the board to conclude, and so we recessed and came down here and finished up our meeting.”

The board fully understood and appreciated students’ passion, Wilkerson said, and as a result of it, will now hold months of dialogue on how metal detectors are used. It will also mandate training for the school police officers who use them.

“I don’t want children feeling criminalized, or feeling like they’re entering prisons when they’re entering schools,” Superintendent William R. Hite Jr. said after the meeting ended.

Both Hite and Wilkerson said they welcomed opposing viewpoints, but said they took issue with the public disruption of the board meeting.

“What happened in today’s meeting could set us back in terms of how that discourse occurs,” Hite said.

In its unexpected private session, the board did give preliminary approval to the $3.4 billion spending plan for 2019-20, which would add funds for more math assistance, nurses, and teachers for English-language learners.

The budget represents a 7.1 percent increase in expenditures over the current $3.2 billion spending plan, with cost increases largely driven by payments to charter schools and planned salary increases driven by the Philadelphia Federation of Teachers’ contract.

It projects a modest fund balance at the end of fiscal 2020, but the picture is less rosy in the final years of the district’s five-year plan. By 2022, the district is projecting a $30 million budget deficit.

Of the projected deficit, Uri Monson, the district’s chief financial officer, he was not alarmed — yet.

“We want people to be aware of it, so there are no surprises. We’ll keep trying to find ways to adjust and make those numbers better.”

Hite said the 2019-20 budget, which is scheduled for final adoption by the school board at the end of May, would not recommend any school closures.

“There’s still some consolidation we could do, particularly around our comprehensive high schools," Hite said at a news conference. “We have many of those schools that are below capacity in terms of who is attending.”

He said the district would look for creative ways to consolidate and use excess space, as it has with Benjamin Franklin High School. Science Leadership Academy, a popular magnet school, will relocate from rented space into Ben Franklin in the fall.

And while some schools are under-enrolled, others in Center City, South Philadelphia, and the Northeast are bursting at the seams.

The superintendent said the district would also look at how certain school boundaries are drawn, and possibly at how grades are configured.

“We have to think about facilities writ large,” said Hite.

Correction: A previous version of this story misstated the size of the district’s projected budget deficit. It is $30 million, not $300 million.