MANILA, Philippines — A strong earthquake killed three people and trapped several others Monday in a collapsed building that housed a supermarket in a northern Philippine province, where an international airport terminal was closed due to damage, officials said.

Mayor Condralito dela Cruz of Porac, a town in Pampanga Province, north of Manila, said rescuers pulled two survivors from the collapsed building, where other trapped people could be heard screaming for help as rescuers struggled to save them.

An Associated Press photographer saw a third survivor and the body of a woman being extricated by rescuers from the rubble late Monday. The rescue work picked up pace after four cranes arrived at the scene, where Red Cross volunteers, police and soldiers helped out.

A child was one of two dead people pulled out from the rubble earlier in the day. The leg of one of the two survivors had to be amputated to extricate him, Porac Councilor Maynard Lapid said, adding that at least eight trapped people could be heard pleading for help at one point.

"One of the trapped was seen waving for help from behind a glass window but we cannot see him now," Lapid told The Associated Press by telephone.

At least 31 people remained unaccounted for at the collapsed Chuzon supermarket, based on a rough accounting of its employees, although some could have been elsewhere when the earthquake struck, Lapid said.

The four-story building crashed down when the 6.1 magnitude quake shook Pampanga as well as several other provinces and the capital, Manila, on the main northern island of Luzon. The quake was caused by movement in a local fault at a depth of 8 miles near the northwestern town of Castillejos in Zambales province, said Renato Solidum, who heads the Philippine Institute of Volcanology and Seismology.

"People told me that the ground moved like waves," Lapid said.

Pampanga Gov. Lilia Pineda told DZMM radio that she had received reports that the quake left at least eight people dead in her province, a rice-growing agricultural region, but could not provide details. Cellphone signals were erratic in the province.

The quake also damaged an airport terminal at Clark Freeport, a former U.S. Air Force base, and an old Roman Catholic church in Pampanga, and caused cracks in highways and bridges, Pineda and other officials said.

Clark airport was closed temporarily because of damaged check-in counters, ceilings and parts of the departure area, airport official Jaime Melo said, adding that seven people were slightly injured and more than 100 flights were canceled.

In Manila, hundreds of office workers dashed out of buildings in panic, some wearing hard hats, and residents ran out of houses. Dozens of aftershocks were recorded.

The Philippines, one of the world's most disaster-prone countries, has frequent earthquakes and volcanic eruptions because of its location on the Pacific "Ring of Fire," a seismically active arc of volcanos and fault lines in the Pacific Basin.

A magnitude 7.7 quake killed nearly 2,000 people in the northern Philippines in 1990.