Peru's National Civil Defense Institute (INDECI) said it had not received reports of serious damage or injuries, and authorities did not issue a tsunami alert.
The quake struck at 6:51 pm local time (23.51 GMT). Its epicenter was 28 miles (45 km) south-southwest of Piura and it occurred at a depth of 6.1 miles (9.8 km), the USGS said.
Brazilian construction company Odebrecht SA said its $700 million irrigation project in the area was unaffected.
Still, the quake jolted the northern coastal region of Peru, with local media reporting that some people ran into the street after the tremor, fearing their homes could cave in.
A witness on local radio RPP said the cross on the dome of a local church fell off.
The quake was also felt in parts of neighboring Ecuador, according to Peruvian newspaper El Comercio.