Local media said the initial quake lasted about two minutes and could be felt in the capital, Lima, some 145 kilometers from the epicenter. Some residents ran into the streets of Lima, where the quake caused blackouts and cut cellular phone service in some neighborhoods.
Media reports say the quake caused serious damage in several towns south of the capital.
Shortly after the quake, the Pacific Tsunami Warning Center issued a warning of an ocean surge for Latin America's Pacific coast. The Hawaii-based center later canceled the warning, saying the tsunami was not a threat.
Peru was struck by a 7.5 magnitude quake that killed five people in 2005. Peru lies near the boundary of two tectonic plates, which makes the region vulnerable to strong earthquakes.