The quake, at an “intermediate depth” of around 110 kilometres, was felt around the country and even hundreds of miles away in the capital city of Lima, local authorities reported.
There were no initial reports of casualties or of significant damage.
Intermediate depth quakes typically cause less surface damage than shallower tremors. Peru sits on the so-called Pacific “Ring of Fire” where the majority of the world’s seismic activity occurs.
The earthquake was around 75km SSE (south-southeast) of Lagunas and 180 km east of the town of Moyobamba, the USGS said.
Footage released by Peruvian singer Ezio Oliva captured the exact moment when the quake struck during his performance in the town of Rioja, in San Martin region in northern Peru.
There were local reports of electric power cuts in the cities of Iquitos and Tarapoto, Amazonian towns in the Loreto region of the country. Pictures and videos online also showed some cracked and damaged walls.
Peruvian President Martin Vizcarra said on Twitter that authorities were “evaluating the affected areas” and urged people to remain calm.
(Production: Carlos Valdez)