The quake occurred at 23:35 GMT on Sunday, about 75 kilometres (46 miles) southwest of Santiago de Cao and 58 miles (94 km) southwest of Trujillo, the centre of Peru`s second most populous metropolitan area.
There has been no information on damage or casualties.
Peru is located in the so-called Ring of Fire quake zone, which is home to over 75 percent of the world`s active and dormant volcanoes and accounts for about 90 percent of all earthquakes.
According to the Richter scale, earthquakes with a magnitude of 5.0-5.9 are considered to be moderate and can lead to casualties and cause damage to buildings and infrastructure.
More about: