The earthquake occurred Saturday afternoon off the coast of Ecuador, leaving at least 12 people dead, authorities said.