A man was sentenced to 208 years in prison by a Mexican court for the criminal homicides of 26 people who died when a school collapsed during a powerful earthquake that hit Mexico City in 2017.

According to Reuters, most of the victims were children who were crushed to death when the Enrique Rebsamen elementary school collapsed after a 7.1-magnitude quake struck Mexico City.

The Mexico City attorney general's office said the man was described as the director responsible for working on the structural safety of the school in Tlalpan.

The man has reportedly approved the construction work at the school without carrying out the required testing and even with the irregularities in the building's construction.

The attorney general's office named the man Juan "N." But local media identified him as Juan Mario Velarde Gamez. Aside from the lengthy prison sentence, the court also ordered Velarde to pay $19,000 to each of the victims' families.

Mexican prosecutors earlier said they had launched an investigation into a possible criminal responsibility of the owner and private inspectors for the school collapse.

Prosecution spokesman Ulises Lara said the sentence was the result of professional malpractice and completely fraudulent action, according to a France 24 report.

Lara noted that despite knowing that there were serious risks to the structure, Juan Mario Velarde Gamez had allowed the school to continue its operations.

Meanwhile, school owner and head Monica Garcia Villegas was sentenced to 31 years in prison for culpable homicide. She was convicted last October.

Villegas was arrested after she was found to have built a large apartment on top of the classrooms. Its weight was thought to have contributed to the school building's collapse.

READ NEXT: Are You Prepared for a Zombie Apocalypse? CDC Offers Tips to Survive One

Mexico City Earthquake That Caused School to Collapse

The 7.1 magnitude quake killed more than 300 people in total and caused major damage. Aside from the school that collapsed, dozens of buildings collapsed across Mexico, including some churches where several worshippers were killed, BBC News reported.

Former Mexico's President Enrique Peña Nieto had declared three days of mourning at the time. More than 500 members of the Army and Navy, with 200 police officers and volunteers, had worked at the school site that time.

At least 209 schools were affected by the quake. Fifteen of those affected schools have suffered severe damage. Around 369 people died in the capital and surrounding states.

At least 15 people were killed when a church near Mexico's Popocatepetl volcano collapsed during a Mass. The volcano had a minor eruption due to the tremors brought by the earthquake at the time. In Puebla, another church collapsed during a baptism, which killed 11 people, including the baby.

Mexico has always been prone to earthquakes as it sits where three of the Earth's tectonic plates, namely the North American, Cocos, and Pacific plates, are located.

According to a U.S. Geological Survey report, Mexico experienced 19 earthquakes of at least 6.5-magnitude within 155 miles of the epicenter of the 2017 September tremor over the past century.

Former President Donald Trump had offered support to the people of Mexico City, being the president when the quake happened.

READ MORE: CDC Releases New Guidance When to Continue and Stop Home Isolation 

This article is owned by Latin Post

Written by: Mary Webber

WATCH: Special Report: Deadly Earthquake Hits Central Mexico - From NBC News