The tremor had a preliminary magnitude of 6.5, according to the country’s national seismological agency.