A 7.2-magnitude earthquake in the central Philippines has killed at least 32 people and caused widespread damage to buildings and markets.

The quake was centred within 2 miles of Carmen town on the popular beach island of Bohol, north of Mindanao. Five people died in a stampede in nearby Cebu, where the belltower of the country's oldest church collapsed.

Five more people were killed when part of a fish market collapsed in Cebu city, just across the strait from the quake's epicentre. Two more died and 19 were injured when the roof of a market in Mandaue caved in. Dozens more were injured.

Pictures broadcast on local TV stations showed a collapsed two-storey concrete building with media reporting that an eight-month-old baby and another person had been pulled out alive.

Many of the central Philippines' historic buildings were damaged. In Loboc town, south-west of Carmen, a 17th-century limestone church was left in ruins, while in Bohol a 400-year-old tower collapsed on to surrounding buildings. Other Spanish colonial churches, including Cebu's 16th-century Basilica of the Holy Child – the Philippines' oldest church, which lost its belltower – were also reportedly damaged.

Authorities initially struggled to reach areas affected by the quake, local media said, as power lines were knocked down and phone networks taken out.

Cebu province and nearby Bohol are home to nearly 4 million people combined and are popular with local and foreign tourists, who visit the region's beaches and Chocolate Hills.

Authorities said casualties may have been limited by Tuesday being a national holiday. "It's fortunate that many offices and schools are closed due to the holiday," said Jade Ponce, assistant mayor of Cebu city.

Patients in the city's hospitals – some of whom ran into the streets during aftershocks – had been evacuated to open spaces including basketball courts, Ponce said. They would be moved back in "as soon as the buildings are declared safe".

Vilma Yorong, a Bohol provincial government employee, said she was in a village hall in Maribojoc town when "the lights suddenly went out and we felt the earthquake".

"We ran out of the building, and outside we hugged trees because the tremors were so strong," she told Associated Press by phone. "When the shaking stopped I ran to the street and there I saw several injured people. Some were saying their church [had] collapsed."

She and the others ran up a mountain, fearing a tsunami would follow the quake. "Minutes after the earthquake people were pushing each other to go up the hill," she said.

Earthquakes are common in the Philippines, an archipelago of more than 7,100 islands that lies on the Pacific "ring of fire". Three other earthquakes have struck Bohol in recent years, the largest being a 6.9-magnitude quake last year.

Experts warned that while there was no threat of a resulting tsunami, residents should beware of landslides, particularly in the south-west of Bohol.