At least eight people have been killed by a 5.1 magnitude earthquake that struck a village near Cuzco in southern Peru, a civil defence official has said.

The shallow quake at a depth of just 8km affected the village of Misca late on Saturday night, as well as the nearby communities of Cusibamba Bajo, Cajay, Canopato, Mollejcato, Muyoc and Toray in the province of Paruro.

Authorities declared a 90-day state of emergency in the region, saying that 45 adobe-and-stone houses had collapsed and more than 500 people had been left homeless.

According to local media, five adult women, two girls and one man were among the victims.

President Ollanta Humala has promised to offer assistance and is due to visit the area.

He said the state of emergency would help the efforts to rebuild Misca, a village of 160 Quechua inhabitants located 595km southeast of the capital Lima, that was at the epicentre of the earthquake.

A resident from Misca called Alfredo Castilla, 29, told the AP news agency that "the only thing standing is the school, which was built with cement.

"Almost everything else is destroyed, including our only church," a reference to the Santisima Trinidad church, which was built out of adobe and stone in the 18th century.

Rescue teams trained to work at high altitudes have been brought in to help with the search and recovery operation. 

It took some time before emergency workers arrived, as the earthquake hit such a remote area.

The infrastructure related to Peru's key mining sector has not been damaged.

Farmers reported a significant loss of animal life, including cows and pigs.

Source: Agencies