A magnitude 7.1 quake struck nearly 250 km (155 miles) northwest of Puerto Maldonado, Peru, at a depth of 610 km, the US Geological Survey said.