Updated

Wails of grief gave way to howls of panic Friday when aftershocks jolted this village as it recovered the last of 26 children -- including all the first graders except one -- killed when an earthquake destroyed their school.

Two elderly woman were killed in their homes and a teacher was crushed with her students Thursday as they prepared to celebrate Halloween. Officials said late Friday that the final death toll was 29.

After Friday's secondary temblors, authorities ordered San Giuliano di Puglia's 1,900 residents to evacuate the town as accusations mounted about shoddy construction in a quake-prone zone.

Illegal construction is rampant in southern Italy, and prosecutors on Friday opened an investigation into the collapse of the school, one of the few buildings in town that was destroyed by the 5.4-magnitude temblor.

Critics also questioned why authorities hadn't designated the region, about 140 miles southeast of Rome, a quake-prone area, which would have required stricter, anti-earthquake building regulations.

The shock of Thursday's loss turned San Giuliano Di Puglia silent Friday, but for the cries of relatives. This remote, tightly knit community is composed largely of farmers producing olive oil, and many felt like a chunk of the next generation was gone.

"In this moment more than in any other, you can't express your sadness," said 69-year-old Matteo Campanelli, who lost four grandchildren in the rubble. "They were children. Let's hope the angels embrace them."

He spoke at the entrance of a gymnasium outside the town center that had been converted into a morgue, where families wailed alongside open caskets.

Most of the dead children had been covered. But a few could be seen lying in caskets, alongside basketballs, toys, photos and soccer jerseys that relatives chose to bury with them. Some children were placed in large mahogany coffins because the town ran out of small white caskets.

One child was rescued alive Friday, more than 15 hours after the quake: 9-year-old Angelo, who was pulled out at 3:54 a.m.

Residents evacuated from their homes were spending the night in a tent city erected on the village's sports fields. News reports said 3,000 people in the affected region remained homeless.

The school itself was a 35-foot pile of stone and bent metal littered with "Puss N' Boots" books, an "E.T." pencil case, backpacks and a sneaker.

Earlier Friday, rescuers extracting the final corpses hurtled down the heap of rubble when the aftershocks rumbled through town, including one registering a 5.3 magnitude. But they returned to remove the final body, that of a teacher credited with saving several pupils.

"She's a hero. She pushed all her children out and then the building collapsed on her," said Stefan De Mistura, a former U.N. official and the head of the Italian Red Cross. "She was shouting for the children to go out."

Another teacher who survived, Clementina Simone, said she was giving her students a geography lesson about earthquakes this week near erupting Mount Etna in Sicily when the earth shook in San Giuliano di Puglia.

"I was told I had lost all of my nine first grade pupils," said Simone. "I wanted to go back and help, but the rescuers wouldn't let me."

However, one first grader, 7-year-old Veronica, told reporters Friday from the hospital that she survived by hiding under a desk.

Pope John Paul II, appearing at his window overlooking St. Peter's Square at the Vatican, offered prayers for the victims and encouragement to survivors and the rescue crews.

With the last body removed, though, attention shifted to why the 50-year-old yellow complex, which housed a nursery, elementary and middle school, collapsed while other buildings remained standing.

The ANSA news agency reported that a second story had been added to the original structure in recent years and that renovations were carried out two years ago in which heavy cement was applied to the structure to try to reinforce it.

The last time authorities updated quake plans for the region, San Giuliano di Puglia was not considered at risk for strong earthquakes, engineer Enzo De Crescio said. The school, he said, did not meet earthquake safety standards.

Enzo Boschi, president of the National Institute of Geophysics and Vulcanology, said the region should certainly be considered at risk for quakes, and urged residents to demand their mayors designate it as such.

A consumer protection group, Codacons, said it had launched a campaign for safety in schools a few months ago, in the area hit by Thursday's temblor. It said its nationwide survey of schools found 27 percent of buildings needed urgent work and many schools lacked escape plans.

In light of widespread illegal construction in the region, the government is considering granting yet another amnesty so builders and homeowners of illegal buildings will come forward and pay fines.

Friday was a national holiday in Italy and regional government officials could not be reached for comment.

Grieving residents were reluctant to talk to reporters, particularly about the building issue.

"We don't know who was responsible," Campanelli said, choosing not to dwell on the accusations but on describing his four "affectionate" grandchildren.

"After this tragedy, I don't think it will be the same," he said. "All these babies are dead. Let's say they went in their sleep. There were two or three moments -- they wouldn't have realized."