A gas explosion has struck a children's hospital in Mexico City, killing at least three people and injuring dozens, including 22 children, officials say.

Rescuers combed through the rubble of the Maternity and Children's Hospital in the Cuajimalpa borough on Thursday, to look for people who were trapped following the blast.

Al Jazeera's John Holman reports from Mexico City

Rescue operations after natural or man-made disasters are something Mexico does well. The country has had so many earthquakes - courtesy of its position in a major seismic zone - that it generally has well-oiled plans and drills for crises like the one on Thursday, in which a faulty hose on a gas tanker led to an explosion in a maternity hospital in Mexico City. Police, ambulances and armed forces swiftly arrived to ferry away and treat the more than 60 people injured.

Although the reaction to the explosion was effective, perhaps it is time for the country to ask itself why this happened again. Two years ago 25 people died in a gas blast on a highway to the north of Mexico City, and last year three people died in a gas leak explosion at a shopping centre in the northeast of the country. Gas in Mexico is mostly transported to homes and buildings by tankers and lorries owned by private companies. In the aftermath of Thursday's events, it may be time for authorities to take tighter control of how gas is moved and used.

A 25-year-old nurse and a newborn baby died at the scene, while another infant died several hours later at another pediatric hospital, said Armando Ahued, the city's health secretary. 

The blast happened when a gas tanker blew up outside the building in the morning, officials said, adding that 110 people were inside the hospital at the time.

Officials said the explosion took place when workers were unable to control a hosepipe leak.

Television images showed people with bloodied faces being carried to ambulances.

Around 40 percent of the hospital has collapsed, Al Jazeera's Adam Raney reported from Mexico.

He said that rescuers initially faced a shortage of ambulance trucks.

Mexico City Mayor Miguel Angel Mancera said at least 32 adults and 22 children were injured, though none were in serious condition. Most were hit by shattered glass.

Mexico has been hit by other gas explosion tragedies in recent years.

In February 2013, 37 people died in the headquarters of the state energy firm Pemex in Mexico City following a gas build-up in the skyscraper's basement.

In May 2013, 25 people died following a gas-tanker accident in Mexico City.

Last year, three people died in the northeastern state of Tamaulipas when a gas leak caused an explosion in a shopping centre.

Source: Al Jazeera and agencies