State Senator Michael Gianaris speaks at the Long Island City High School graduation ceremony.

For two high schools that filled a large auditorium at Queens College yesterday for their graduation ceremonies, the festivities were bittersweet.

Long Island City High School and Flushing High School are among 24 city schools graduating their final cohorts before closing and reopening this summer.

Students who were enrolled in the schools this year and didn’t graduate  will continue to attend them. But their schools will have new names and many new teachers, in accordance with the rules of a federal school reform model called turnaround.

Earlier this year, the schools had packed their own auditoriums to protest the turnaround plans, which Mayor Bloomberg surprised them by announcing in January.

On Wednesday, the room reverberated not with chants but with applause — this time, to honor their newly-minted alumni. Yet the impending closures were not far from the minds of the graduation speakers, a mix of alumni, principals and top students, some who immigrated to the United States shortly before beginning high school.

“It is sad to know we are the last graduating class of Long Island City High School, but it is also an honor,” Xi Xi Hu, Long Island City High School’s valedictorian, said in her speech.

“How sad that the oldest high school in New York City will no longer be,” New York University professor Pedro Noguera said to sighs of dismay from Flushing’s crowd.

A major component of the turnaround process, the rehiring of school staff, could be shaken up this week if an arbitrator rules in favor of the teachers union, which is disputing the city’s right to carry out the process. If the arbitrator rules in the city’s favor, turnaround would continue unimpeded.

But there was no uncertainty among the graduation speakers.

“The story of Long Island City High School ends today with you, and that gives you the responsibility to show the people who made the decision to close this school that they were wrong,” State Sen. Michael Gianaris told the crowd of blue-and-white-clad Long Island City students, who cheered when he mentioned the school’s popular gymnastics coach. “They made a huge mistake in deciding to close Long Island City.”

And as the ceremony ended, outgoing principal Maria Mamo-Vacacela asked the students to hold hands and quietly pray for the restoration of Long Island City High School’s name to the school that will replace it. The city has dubbed the new school Global Scholars Academies of Long Island City.

“Everyone thinks that Long Island City High School is going to die and not be reborn,” Mamo-Vacacela said. “We will not let 30 years pass until Long Island City High School as five continuous words exists again.”

In her speech, Mamo-Vacacela alluded to massive scheduling problems early in the school year and praised the students for their ability to overcome both that setback and the turnaround plans.

“We had a problem, we had to find a solution. Things changed, we had to adapt,” she said. “Thing changed again, we adapted again. They threw us another curveball, and Long Island City High School adapted again.”

Flushing High School students throw their graduation caps in the air.

At Flushing’s afternoon ceremony, Noguera opened his keynote speech by telling students that turnaround, which he said he opposed, was not a reflection on them.

“You have proved to yourselves and to us that you are worthy of the highest honors and diplomas you receive today. You have not failed,” he said. “The system has failed. Any system that thinks it is in the interest of the public to close schools rather than to help schools is a system that is in need of serious change and reform.”

After the ceremonies, some of the students gathered with their families to take photos and exchange hugs said they felt disappointed with the city’s decision to close their schools. But they were more focused on the task of moving on to college.

Mariela Peña said her fondest memories of Flushing included a senior retreat to upstate New York and teachers who urged her to pursue her interest in journalism, which she plans to study at Kingsborough Community College.

“Throughout my four years in high school I got to meet so many new people,” she said. “It sucks the school had to close down.”