News station Canal N said a church collapsed in Ica, south of Lima, killing at least four people and injuring 70.
 
TvPeru said others were killed or injured by collapsing buildings in the coastal cities located near the epicentre of the quake.
 
Witnesses said the tremors shook buildings in two bouts, lasting between 20 seconds and two minutes each.
 
There were fears that the strong temblor would have been deadly for shanty towns surrounding the capital.
 
The earthquake cut power lines and disrupted water services in Lima.
 
Local media reported a fire in one district in the capital and homes destroyed in Pisco, a poor township near the epicentre.
 
The health ministry declared a disaster as ambulances and rescue workers rushed to the city.
 
"People here hugging and crying in fear on the streets," said Cristyane Marusiak, a resident.
 
The US Geological Survey said the quake hit about 40km northwest of Chincha Alta.