There are no immediate reports of damage or injuries.
The U.S. Geological Survey says it was centered just off the coast, 31 miles (50 kilometers) from Ica at a depth of 9.2 miles (15 kilometers).
The location is 186 miles (299 kilometers) southwest of Lima.