MEXICO CITY — Mexican officials have begun an investigation to determine whether a school that collapsed in last week’s quake, killing 19 children and six adults, may have violated construction codes.

Outside inspectors had signed off on the school building’s safety as recently as three months ago, but the inquiry will look for “hidden defects,” Claudia Sheinbaum, the delegate in charge of the Tlalpan district, said Monday.

The collapse at the private Enrique Rébsamen school quickly became the most riveting emblem of the loss caused by the Sept. 19 earthquake, which has killed at least 326 people — 187 of them in Mexico City.

Some 40 buildings collapsed, spanning the city’s physical and social divides. Dozens of people were buried in an office building in the upscale Roma district, and many others were killed in a garment workshop in the central Obrera district. Five college students died at an elite university, and rescue workers were still recovering victims Monday at a housing project in the south.