The earthquake, which struck just after 10 a.m., was centered about 6 miles southeast of York Harbor. Its effects were felt as far north as Bangor and south as New York City.