For weeks, Theresa Ta had been unable to sleep, study, or even think of looking for another school.

Her school, West Catholic High, with the motto "united by faith, loyalty and knowledge," was slated to close.

West was one of 49 schools the Archdiocese of Philadelphia had planned to shut down, and the only high school of four that did not appeal the decision.

"It was all happening so fast," Ta, a junior, said Friday, standing in the school's auditorium, ponytailed in her navy uniform.

Rumors had spread of a slight chance that the school might survive. Ta waited Friday afternoon with other anxious students to hear the official word and watch a live news conference with Archbishop Charles J. Chaput.

"It's God's will," senior Joy Kim said before the announcement Friday. "All I can do is wait for it."

On Jan. 6, when she first heard the school would close, "my heart broke into pieces," Kim said.

Shortly after 3 p.m., a hush came over the room as the live stream from a projector began. Chaput was drowned out within seconds after the words West Catholic were uttered among those of the saved schools.

West Catholic, a school of about 360 students, has stood, first as a boys' school, since 1916. It has routinely graduated nearly all of its seniors, most bound for college.

In the auditorium Friday, students cried, clapped, hugged, and jumped up and down.

Among the tearful was junior Haeley Horan, three generations of whose family have attended West Catholic. She had been walking around in a daze for the last few weeks, trying to process the prospect of the school's closing.

"Oh, my God, this is the best day of my life," she said, removing her glasses to wipe away tears.

"I can stay at home, I can stay with my family," she said of her extended school clan.

Every day, Sister Mary Bur had broadcast a special prayer over the loudspeaker that encouraged everyone to have a bold heart, discernment in the midst of confusion, and patience with the unfolding life.

"It's been a hard year," said Sister Mary, a large silver crucifix around her neck. Like other schools, West Catholic faced dwindling enrollment and donations, and dwindling hope that the school would remain open.

"To me, it's a miracle," she said. "I really mean that."

The former West Catholic president, Brother Timothy Ahern, had said he did not want to raise false hopes and did not file an appeal. Ahern, an alumnus, resigned Feb. 9 after the entire faculty signed an unauthorized appeal made directly to the archdiocese.

On Friday, Ahern was he was "shocked, absolutely shocked," by the news, "given all the things the archdiocese said of closing the school, and the financial stability, and everything else."

On Jan. 6, the archdiocese announced a proposal, subject to appeals, that would close 45 grade schools and four high schools: St. Hubert Catholic High School for Girls in Holmesburg, Conwell-Egan in Fairless Hills, Monsignor Bonner-Archbishop Prendergast in Drexel Hill, and West Catholic.

But since then, private donors, led by developer J. Brian O'Neill but most requesting anonymity, stepped in with $12 million in donations, offering their charity to West Catholic as well. On Friday, Chaput announced plans for a permanent foundation with a fund-raising goal of $100 million by 2017.

Ahern was happy Friday that his old school had "been given new life."

"But I never thought in a million years they would say it could stay open, given the fallen enrollment and what it takes to run a school year after year," he said.

Ahern pointed to the challenges facing West Catholic. The school, he said, did not recruit freshmen for next year, and some of the 200-some underclassmen, believing the school would close, may have enrolled somewhere else.

Then there are rising tuition costs. "You can't compete with free," Ahern said, referring to charter schools. "And you need a consistent cash flow."

But those concerns did not cloud the auditorium Friday.

Sixteen-year-old Ta, soon after the announcement, found herself in a bear hug with her sister Odile, a senior.

"I am so happy right now," Ta said. "I don't know how to thank the people who donated. I don't care about what happens tomorrow, or next year, as long as I'm at West Catholic now. This large burden has been lifted off me."

Inquirer staff writers Jeff Gammage and Kristen A. Graham contributed to this article.