The quake hit at 1:26 pm (1826 GMT), with its epicenter located just off the coast of western Panama in the Pacific Ocean, according to the National System of Civil Protection.
The earthquake struck in a zone known as the "Panama fracture" near the town of David, the capital of Chiriqui province, near the border with Costa Rica, the agency said.
The US Geological Survey also confirmed the quake, saying it had a magnitude of 6.0 with its epicenter 335 kilometers (210 miles) west-southwest of Panama City.
The center of the quake was about 20 kilometers (12.4 miles) below the earth's surface, the USGS said.