An earthquake hit northern Haiti late on Saturday, killing at least 12 people and sparking an overnight scramble to help towns in the impoverished Caribbean country battered by the shockwave.

At least eight people died in Port-de-Paix, the communication ministry tweeted Sunday. Port-de-Paix is on the northern coast near the epicenter of the magnitude 5.9 quake, which struck at a depth of seven miles, the U.S. Geological Survey (USGS) said. Police said more than 100 were injured in the area.

Another four people were killed in and around the town of Gros-Morne further south, local authorities said. Rescue teams fanned out to help residents, many of whom were still dealing with the trauma of a devastating earthquake in 2010.

Port-de-Paix, Gros-Morne, the town of Chansolme and the northern island of Tortuga were among the areas worst hit, Haiti's civil protection agency said in a statement.

A bed is covered in rubble caused by a magnitude 5.9 earthquake the night before, in Gros Morne, Haiti, on Oct. 7, 2018. Dieu Nalio Chery / AP

"The shock was felt across all departments of the country, giving rise to panic in several towns," the agency said.

President Jovenel Moise urged people to remain calm, and said on Twitter he had ordered "all of the republic's resources" to be directed towards assisting recovery efforts.

Some houses in the worst-affected areas were destroyed by the earthquake, the agency said.

Dozens of injured people were rushed to hospitals, and the full extent of the destruction may not be clear until Sunday morning.

The civil protection agency said early on Sunday that at least 135 people were being treated for injuries.

Sr Maryse Alsaint walks alongside a school damaged by a magnitude 5.9 earthquake the night before, in Gros Morne, Haiti, on Oct. 7, 2018. Dieu Nalio Chery / AP

Among the damaged buildings was a church in the northern town of Plaisance, the agency said.

The tremor was one of the strongest to batter Haiti since the 7.0 magnitude earthquake struck near the capital, Port-au-Prince, in 2010. It killed tens of thousands of people.

Saturday's quake was felt in Port-au-Prince but initial reports suggested it had not caused major damage there.

Local newspaper Le Nouvelliste said one person was killed when an auditorium collapsed in Gros-Morne and that detainees were released from a damaged police holding cell.