The earthquake surprised residents and tourists. Authorities are assessing potential damage to infrastructure in areas near the epicenter.