The earthquake was felt as far away as in Canada, shaking buildings, delaying flights, and sending thousands of frightened workers into the streets.