People injured in an earthquake that hit northern Haiti late on Saturday, are being looked after in a tent, in Port-de-Paix, Haiti, October 7, 2018. REUTERS/Ricardo Rojas

PORT-DE-PAIX (Reuters) - The weekend earthquake which battered Haiti killed 17 people, authorities said on Tuesday, and damaged or destroyed nearly 2,500 houses, sparking fears that many buildings are in a precarious state in the impoverished Caribbean country.

The shallow, magnitude 5.9 earthquake struck northern Haiti on Saturday, spreading panic, particularly around Port-de-Paix, a coastal town that absorbed the brunt of the shockwave.

Two more people were confirmed dead on Tuesday, taking the death toll to 17, according to Haiti’s civil protection agency. Another 333 people were injured, it said. Prime Minister Jean Henry Ceant said 2,280 houses were damaged and 168 destroyed.

The quake, centered just off the north coast, was one of the strongest to hit Haiti since a 7.0-magnitude earthquake near Port-au-Prince killed tens of thousands of people in 2010.

There have been several aftershocks, causing alarm around Port-de-Paix, particularly inside the local prison.

“The prison walls are all cracked by the earthquake, and the building may collapse and kill all of us any time,” inmate Dosty Pierre, 30, said from his prison cell.

He and other prisoners urged authorities to move them.

The national administrative police chief, Carl-Henry Boucher, told Reuters that the penitentiary authorities in the capital were working on the issue, but could not say when the prisoners would be moved to a different jail.

On Sunday, prisoners organized a riot to escape and got out of their cells, but guards and riot police foiled the jail break, said Jackson Hilaire, police chief for the northwest region.