A strong, shallow earthquake shook the central Philippines on Thursday, injuring dozens of people, including at least 10 in a collapsed building, knocking out power in some areas and sending villagers fleeing from their homes, officials said.

The U.S. Geological Survey said the quake had a magnitude of 6.5 and struck at a depth of 6.5 kilometers (4 miles) in Leyte province. Filipino seismologists measured the depth at just two kilometers (1.2 miles) and said it was felt strongest in Leyte's Kananga and Jaro towns.

Shallow earthquakes generally cause more damage on the Earth's surface.

A building collapsed in Kananga, injuring at least 10 people and trapping an unspecified number of others, Vice Mayor Elmer Codilla said. "There's an ongoing rescue," he told DZMM radio.

Codilla said he wasn't aware how many people were in the building, which had a grocery store and a beauty parlor on the ground floor. Police said it had two floors.

Thousands of residents, office workers and students fled from homes, buildings and schools and some were knocked over as the ground shook.

Mayor Richard Gomez of Ormoc city, about 30 kilometers (17 miles) from Kananga, told DZMM that at least 29 people were injured in his area, including 16 who were taken to a hospital because they had slight injuries or were traumatized.

The strong shaking caused cracks in some buildings and roads in the city and power was automatically shut off, Gomez said.

Delia Vilbar, the treasurer of Ormoc, said she was attending a meeting on the second floor of City Hall when the earthquake struck.

"It was very strong, and the building was shaking," she said. "I sat down while others in the room went under the table."

When she went outside to the street, she saw people crying and embracing each other, she said.

Asked about the earthquake, President Rodrigo Duterte, who was visiting southern Bukidnon province, said he had not received any reports of major damage.

The quake struck in a region that was devastated in November 2013 by Typhoon Haiyan, which whipped up huge waves that left more than 7,300 people dead or missing, leveled entire villages and displaced more than 5 million villagers.

The Philippines sits on the Pacific "Ring of Fire," where earthquakes and volcanoes are common. A magnitude 7.7 quake killed nearly 2,000 people in the northern Philippines in 1990.