A massive earthquake struck the Chilean coast near Valparaíso, killing thousands and destroying much of the port city just before the country's independence celebrations.