The quake hit 384 kilometers (238 miles) southwest of the capital, Panama City.
There were no immediate reports of damage.
Vanessa del Leon, who works at a hotel in David, said she felt the quake, whose epicenter was 110 miles south of the city.
"Everyone started screaming. We heard a lot of things breaking and computer keyboards smashing on the floor," she said. "This hotel has eight floors and it swayed like a palm tree."
The USGS had said the quake was a magnitude 6.1, but later revised it.
It hit at 3:19 a.m. local time, according to the USGS.