Residents had spent the night outside their houses fearing aftershocks.