The men were among 18 employees of major Turkish construction firm Nurol Insaat abducted on September 2 in the Sadr City area of north Baghdad, where they were working on a football stadium project.
Two were released in the southern city of Basra two weeks later.
On Wednesday, the freed hostages looked generally in good health but tired.
"I am happy. I am very happy. I am breathing in my homeland," one worker told the cameras.
The release of the other 16 had been expected after a video in which the kidnappers said their demands had been met was posted online on Sunday.
Prime Minister Ahmet Davutoglu broke the news about their release on Twitter early in the day.
"Our 16 workers have just been received by our Baghdad ambassador. I talked to some of them on the phone," he wrote.
"Thankfully, they are in good health and are preparing to return (home) as soon as possible," he said.
Ankara's ambassador in Baghdad, Faruk Kaymakci, told AFP they were released south of the capital on Wednesday morning.
"I can confirm they were released, around 60 kilometres (35 miles) south of Baghdad, on the road to Karbala," he said.
Kaymakci later showed some of the hostages to the press in front of the embassy.
"These people are really contributing to the development of Iraq," he said, referring to the construction of the stadium in Baghdad.
"They are serving the people of Iraq."
The kidnappers had said Turkey must order rebel forces to stop besieging Shiite villages in northern Syria, stop militants from travelling from Turkey to Iraq, and cut the flow of "stolen oil from Kurdistan through Turkish territory".
The workers travelled to Turkey after the Iraqi authorities interviewed them at the Turkish embassy.
Deputy Prime Minister Yalcin Akdogan said at the airport that Turkey established contacts with the Iraqi central government to secure the release of the men who were later due to be hosted by President Recep Tayyip Erdogan.
Family members could barely speak.
"We have gone through a hard time. I cannot say more," the wife of one of them said.
- Syria truce -
Over the past 18 months, dozens of Turks have been kidnapped but later released in Iraq by the Islamic State (IS) jihadist group, which overran large parts of the country last year.
But Sadr City, where the 18 Turks were kidnapped, is a stronghold of Shiite paramilitary forces opposed to the jihadists.
A soldier was killed earlier this month when security forces clashed with the Tehran-backed Shiite militia Ketaeb Hezbollah while searching for a person allegedly involved in the kidnappings.
The pair of Turkish workers released two weeks ago, one of whom had health problems, were freed in Basra, a city some 450 kilometres (280 miles) south of the capital.
The release seemed designed to project political might and rule out any suggestion that the kidnappings were perpetrated by a purely criminal extortionist organisation.
The remaining 16 were held in the Baghdad area throughout their captivity, the ambassador said.
"They were moved to four different locations but always in the Baghdad area," Kaymakci said.
Of the three conditions set by the kidnappers, the one about military developments in Syria appears to have been the key factor in the negotiations.
A deal was reached last week for a truce in an area where Syrian regime forces backed by Lebanon's powerful Hezbollah group, also supported by Tehran, have been battling Sunni Muslim rebels.
The agreement provides for the evacuation of the Idlib province villages of Fuaa and Kafraya whose residents are Shiites and had been besieged by rebels, including groups Turkey is perceived as having an influence over.
Turkey's envoy to Baghdad would not comment on what led to the breakthrough in efforts to release his country's workers.
---------------------------------------------------------------------------------------------------------------------------
Two were released in the southern city of Basra two weeks later.
On Wednesday, the freed hostages looked generally in good health but tired.
"I am happy. I am very happy. I am breathing in my homeland," one worker told the cameras.
The release of the other 16 had been expected after a video in which the kidnappers said their demands had been met was posted online on Sunday.
Prime Minister Ahmet Davutoglu broke the news about their release on Twitter early in the day.
"Our 16 workers have just been received by our Baghdad ambassador. I talked to some of them on the phone," he wrote.
"Thankfully, they are in good health and are preparing to return (home) as soon as possible," he said.
Ankara's ambassador in Baghdad, Faruk Kaymakci, told AFP they were released south of the capital on Wednesday morning.
"I can confirm they were released, around 60 kilometres (35 miles) south of Baghdad, on the road to Karbala," he said.
Kaymakci later showed some of the hostages to the press in front of the embassy.
"These people are really contributing to the development of Iraq," he said, referring to the construction of the stadium in Baghdad.
"They are serving the people of Iraq."
The kidnappers had said Turkey must order rebel forces to stop besieging Shiite villages in northern Syria, stop militants from travelling from Turkey to Iraq, and cut the flow of "stolen oil from Kurdistan through Turkish territory".
The workers travelled to Turkey after the Iraqi authorities interviewed them at the Turkish embassy.
Deputy Prime Minister Yalcin Akdogan said at the airport that Turkey established contacts with the Iraqi central government to secure the release of the men who were later due to be hosted by President Recep Tayyip Erdogan.
Family members could barely speak.
"We have gone through a hard time. I cannot say more," the wife of one of them said.
- Syria truce -
Over the past 18 months, dozens of Turks have been kidnapped but later released in Iraq by the Islamic State (IS) jihadist group, which overran large parts of the country last year.
But Sadr City, where the 18 Turks were kidnapped, is a stronghold of Shiite paramilitary forces opposed to the jihadists.
A soldier was killed earlier this month when security forces clashed with the Tehran-backed Shiite militia Ketaeb Hezbollah while searching for a person allegedly involved in the kidnappings.
The pair of Turkish workers released two weeks ago, one of whom had health problems, were freed in Basra, a city some 450 kilometres (280 miles) south of the capital.
The release seemed designed to project political might and rule out any suggestion that the kidnappings were perpetrated by a purely criminal extortionist organisation.
The remaining 16 were held in the Baghdad area throughout their captivity, the ambassador said.
"They were moved to four different locations but always in the Baghdad area," Kaymakci said.
Of the three conditions set by the kidnappers, the one about military developments in Syria appears to have been the key factor in the negotiations.
A deal was reached last week for a truce in an area where Syrian regime forces backed by Lebanon's powerful Hezbollah group, also supported by Tehran, have been battling Sunni Muslim rebels.
The agreement provides for the evacuation of the Idlib province villages of Fuaa and Kafraya whose residents are Shiites and had been besieged by rebels, including groups Turkey is perceived as having an influence over.
Turkey's envoy to Baghdad would not comment on what led to the breakthrough in efforts to release his country's workers.
---------------------------------------------------------------------------------------------------------------------------