MEXICO CITY — Gustavo López recognized the boy’s clothes first.

His tiny frame, pulled from the wreckage, lay over the jagged pieces of what remained of the school. It was his 7-year-old son.

He sat in shock for hours, quietly trying to maintain strength for his 9-year-old daughter, who had escaped the school unharmed. He wondered how to tell her that her younger brother, also named Gustavo, was dead — one of at least 30 children who perished at the Enrique Rebsámen school after it collapsed in the earthquake that devastated Mexico on Tuesday, killing more than 200 people.

Mr. López waited there for his cousin, Mauricio, who loved the boy and often took him on bike rides and to the movies. By the time Mauricio arrived a few hours later, hundreds of medical personnel, rescuers, volunteers and families were racing around, trying to unearth students still buried in the rubble.

“He was my son, too,” Mauricio screamed when he heard the news, collapsing onto the upturned earth as Mr. López tried to console him. “I can’t bear this; I can’t!”

Such screams of anguish rose above the clamor at the school overnight, markers of loss in the chaotic crowd. Parents climbed trees and playground equipment to get a better vantage of the rescue effort, clinging to the hope that their children would emerge unscathed.

Many did, having rushed out before tumbling walls could trap them. Passers-by had also raced to the school immediately after the quake to pluck students from the cavities and openings of the buckled structure.

But as the day and night wore on, mostly lifeless bodies were pulled from the wreckage, their names recorded by an army of volunteers keeping lists of the dead. By Wednesday night, five people were known to be still missing, including one student who officials said was alive but trapped as rescuers tried frantically to reach her. Hope was dwindling that any more children would be found alive.