The workers from Geofizyka Krakow were kidnapped by the Pakistani Taliban in November 2016 from the city of Dera Ismail Khan in the country's northwestern Khyber Pakhtunkhwa province.
"They have been freed unconditionally and handed over to us late Sunday," Zafrul Islam Khattak, the top government official in Pakistan's South Waziristan tribal district bordering Afghanistan, told AFP.
Khattak said the release took place with the help of tribal elders who negotiated with the kidnappers based in Afghanistan's eastern Paktika province.
Pictures of the workers seen by AFP show them sitting in a government office with the official in Wana, South Waziristan's main town.
The overall security situation in Pakistan has improved and kidnappings have decreased in recent years, but its northwest and southwest regions bordering Afghanistan remain volatile.
A Polish engineer was seized by suspected Taliban militants in Pakistan's northwest in September 2008 and was later killed.