They were at a barbecue yesterday marking the last day of class, not just for the year but forever, when the three girls slipped from the gathering to spend a final moment in the gymnasium at St. Dominic Savio Preparatory High School, the scene of many wonderful times.

But when they went in, they saw men sanding the gym floor. The red bleachers, where their classmates had cheered them on during basketball games, had already been removed.

"They took all the banners down," said 17-year-old Caitlin Finn, taking shallow breaths to avoid inhaling saw dust. "They didn't even wait till we left."

The Catholic school in East Boston, which has sent generations of young people on to successful lives, has had its last prom, its last graduation. And yesterday, it had its last day of classes. Multiple efforts to rescue Savio from closure have failed. As the school draws its last breaths after 49 years, the hardest part for the students -- and for nostalgic and appreciative alumni -- has been letting go.

A neighborhood institution that has educated multiple generations of the same families ends with 165 students, less than half the number of almost three decades ago, when its student body peaked at more than 400.

"All year, they've been trying to save it," said Michael DiMarino, a history teacher who graduated from Savio in 1997. "I think they're all holding out hope until the door closes. People don't want to leave. I don't think they're grasping the reality of it."

Even as late as Monday, a group of parents, faculty, and alumni known as Save Our Savio committee continued to meet . The same evening, the school's executive board met to reassure staff that it would find the money to honor teachers' contracts, which are supposed to provide pay through the summer.

Savio has had a rebirth before. In 1993, the Salesians of Don Bosco, which established the school, closed Savio, but a board of mostly alumni refashioned it as a coeducational preparatory school and leased a portion of the property. In 1998, the Salesians and the board signed a 10-year lease. The board was responsible for Savio's upkeep and maintenance, but did not have to pay rent.

Until 2002, Savio thrived as enrollment hit 392. But then scandal beset the school, and enrollment began to steadily decline. In 2003, a former athletic director pleaded guilty to indecent assault and battery for molesting three female athletes. This past December, a former wrestling coach was sentenced to five years in state prison after pleading guilty to raping two students and assaulting and hazing three others inside the school.

As enrollment declined, finances became tight, and the building fell into disrepair. Blue tiles are missing from every wall in DiMarino's classroom. Across the hall, in Jim Correale's classroom, a pile of plaster, tile, and chipped paint sits by a hole in the wall.

The school's "understandable financial challenges" hindered the board's ability to maintain the building, prompting the Salesians to not renew the lease, the Rev. James Heuser, provincial of the Salesians of Don Bosco in New Rochelle, N.Y., said in a statement.

"As owners of the building, we could not allow them to continue to deteriorate," Heuser said.

The Save Our Savio committee has raised money and offered to buy the building, but the Salesians have not yet determined how to proceed.

After classes yesterday, Steve Scire, a 1980 alumnus and owner of Carlo's Catering, hosted the barbecue to lift students' spirits.

"The history's been so deep," said Scire, 44, as he cleaned up leftover burgers, vanilla ice cream, and chocolate chip cookies. "I don't think anything can replace it."

Older memories have surfaced for the teachers and staff in recent weeks. Gerald Sullivan, a 1966 alumnus who has been teaching Latin and English there for the past 26 years, remembers gathering in the chapel to learn that President John F. Kennedy had been assassinated.

He has continued to read in the corner of the library, which Marion Dubrawski has run for the past 46 years. He remembers how Dubrawski let him read "The Catcher in the Rye" and other controversial texts of the time that she kept on a top shelf in her office.

He and other staff say they have tried to shield students from anxieties about Savio's demise.

At prom late last month, the girls in slinky, full-length gowns with sparkles and the boys in black and white suits were all smiles as they danced to hip-hop and reggae.

"You want to celebrate the night," Tara Pettee, a 17-year-old junior from Winthrop, said as her classmates danced behind her. "It's kind of like a night off.

Roughly 60 students, including 30 who will be seniors, have enrolled at Pope John XXIII High School in Everett for next school year. Pope John, a rival in sports, has positioned itself as a welcoming school for Savio students, who may wear their red uniforms at the school. Savio records and trophies will be housed at Pope John. Seniors will remain together as a cohort and graduate with a diploma that says Savio Prep, said Pope John's headmaster, Bill Fitzgerald.

In DiMarino's junior civics class, a recent review for the final turned into a discussion of students' fears about attending Pope John. "I don't want to be a tiger -- blue and yellow?" Andrew Miskinis, 16, of South Boston, said and cringed.

Another student worried that the teachers at Pope John were too strict. "Anytime you start something new, it's an adjustment," DiMarino assured him. "You'll adjust."

At graduation two weeks ago, Michael Moccia, the valedictorian of the 70-member senior class, encouraged several hundred parents and others in the gym to look forward.

"It is up to each and every one of us to carry on Savio's name," said Moccia, 18, of East Boston. " Savio is not coming to an end, and never will, so long as the community stays together."