CABANATUAN CITY, Philippines (AP) _ Loida Gabwat's class had just finished a math test when the earth shook, bringing her six-story school down in crumbling concrete on hundreds of students and teachers.

''We were kidding each other, we were saying the test was so easy,'' said the 14-year-old. ''Then suddenly, the walls trembled, the ceiling collapsed and there was total darkness. We embraced each other. We were very scared.''

Survivors groped for one another in the darkened rubble and prayed aloud.

''We were calling out our classmates' names but they did not respond any more,'' Miss Gabwat told a reporter while being taken to a provincial hospital. ''Then we groped for their hands but felt that they were cold. Each time, we wept.

''We were scared and some were screaming. But then later on, they said they wanted to sleep already and rest. Then there was silence.''

Ms. Gabwat lost so many of her friends.

''Mommy, mommy, come here 3/8'' she had screamed when she was pulled from the rubble of the Christian College of the Philippines after Monday's quake. ''I can't go through this alone 3/8 My friends are dead inside 3/8''

Mayor Honorato Perez said about 50 people remained buried today in the rubble of the school - which included first grade through the senior year of college - but fewer than half were believed still alive.

The quake was centered 20 miles northwest of Cabanatuan, a city of 80,000 people.

The rescue efforts that followed were undertaken largely by local volunteers. There was little sign of experienced supervision.

President Corazon Aquino flew to Cabanatuan from Manila early today to console families and visit survivors.

While she was present, a rescuer crawled from the rubble and told reporters he found four boys, all alive. But he said one was pinned under the ruins, in such pain he amputated his own leg with a jagged piece of concrete.

Lt. Benbol Moralde, part of an army contingent sent from nearby Fort Magsaysay, said he believed few remained alive beneath the debris.

Moralde said victims' cries grew fainter and fainter and that he could see bodies and parts of bodies when he surveyed the destruction.

Hours after the temblor, hundreds of family members and friends watched and prayed as rescuers dug through the school rubble.

Each time someone was brought out alive, relatives crowded around the survivor, begging for news of those still missing.

''They told me she's still alive,'' said Rosa de los Reyes, who was waiting word of her daughter, Maria Lisa, 14. ''I'm very happy but if it turns out she has died, I think I'm going to die too.''

Throughout the night, boys as young as seven scrambled between slabs of concrete carrying water to victims still trapped. Sixteen-year-old Florencio Alano crawled through the wreckage looking for his 13-year-old brother, Cesario - only to find out he was dead.

Florencio, who eventually led three survivors to safety, said: ''At first I couldn't believe that he was already dead. So I crawled through the passageway. I saw his face and felt him. What else can one feel but just accept it.''

Rescuers could hear the anguished screams during the night of those buried under tons of debris. Most begged for water. One girl shrieked for rescuers to ''cut off my legs'' to free her.

Cenando Memping, whose 14th birthday was Monday, said he had just invited his three best friends to join him after class at a restaurant when the quake hit.

Cenando and his friends were trapped beneath tons of rubble. He said there were 54 students in his class. More than 10 hours after the quake, he was the only one of them who had been rescued.

''I prayed to God that if I survive, I'll hear Mass every day,'' he said from his hospital bed. He said his friend Michael Nuevo joked that he would never go to a ''high'' school again.

Moments later, Michael died, Cenando said.

''We were kidding each other, comforting each other,'' Cenando said softly. ''Then suddenly, he stopped breathing. He said, 'Praise the Lord. Our Father, Our Father, Our Father.' Then he was silent.''