Radio New Zealand said a tsunami warning was not issued and there were no reports of serious damage or injuries.
The quake, about 8 miles deep, was centered about 14 miles east-southeast of Aitape, 135 miles east-southeast of Jayapura, Indonesia, and 533 miles northwest of Port Moresby, Papua New Guinea, the U.S. Geological Survey said.
The shaking lasted several minutes, media outlets reported.
One person said many people fled to higher ground after the earthquake struck, concerned about a possible tsunami, the BBC reported.
In 1998, Aitape was devastated when an earthquake triggered a tsunami that killed more than than 2,000 people.