Dozens of Turkish hostages seized by Islamic State militants in Iraq have been freed in what Turkey's President described as a secret rescue operation.
The 49 hostages - including diplomatic staff, special forces soldiers and children - were taken from the Turkish consulate in Mosul in Iraq on June 11 after the city was overrun by Islamic State (IS) fighters.
Turkey's Prime Minister Ahmet Davutoglu said they were released after a "pre-planned operation" involving the country's intelligence services.
Mr Davutoglu hugs a child. It is not known if she is one of the hostages"After intense efforts that lasted days and weeks, in the early hours, our citizens were handed over to us and we brought them back to our country," he said.
It was not immediately clear what Turkey had done to secure the safe return of the hostages, but Turkish independent broadcaster NTV said no ransom was paid and there were no clashes with insurgents during the operation to release them.
President Tayyip Erdogan said: "I thank the Prime Minister and his colleagues for the pre-planned, carefully calculated and secretly conducted operation throughout the night.
Mr Davutoglu (L) gets on a plane with the freed hostages"MIT (the Turkish intelligence agency) has followed the situation very sensitively and patiently since the beginning and, as a result, conducted a successful rescue operation."
Police formed a cordon outside the airport in the southern Turkish city of Sanliurfa as the hostages arrived in buses with curtains drawn.
The Prime Minister, who cut short an official trip to Azerbaijan to travel to Sanliurfa, hugged the hostages before boarding a plane with them to the capital, Ankara.
The hostages were taken in Mosul and returned to SanliurfaMr Davutoglu did not provide further details on the circumstances of the release, but said it was carried out through "MIT's own methods".
Sky's Senior Correspondent Ian Woods said: "It seems that some sort of deal must have been done because these are people, unlike the Western hostages, journalists and aid workers, these were people who were not in the country of their own volition.
"To describe this as something co-ordinated by the intelligence service suggests that a deal has been done. It was described as a rescue mission, but we should not think of this as such because is it unlikely they could rescue all 49 people without casualties."
Seizure of the hostages put Turkey in a difficult position as a summit of 30 countries met in Paris last week to co-ordinate their response to the IS threat.
IS fighters in Mosul, Iraq. File imageThe nations agreed to "support the Iraqi government by any means necessary - including military assistance".
Turkey resisted joining the coalition and the United States was careful not to push Ankara too hard as it worked to free the hostages.
The hostage release comes as Turkey opened up its border to thousands of Kurds fleeing clashes with IS in neighbouring Syria.
Under tight security, the refugees, mostly women and children, crossed to the Turkish side of the border in the southeastern village of Dikmetas.
The group is still holding British hostage Alan Henning"We have taken in 4,000 brothers," Mr Davutoglu told reporters.
"The entries have started now. The number might increase. Their needs will be met. This is a humanitarian mission."
Islamic State has killed two US journalists and a British aid worker who were working in Syria in retaliation for airstrikes that Washington launched against them in Iraq.
IS is also holding two British hostages captured in Syria who have appeared in videos released by the group.
A group of Muslim scholars has made a direct appeal to IS to release hostage Alan Henning.
Mr Cantlie was seen in an IS videoIn a video message posted online, the men told the 47-year-old's captors that killing him would be against Islamic law.
Mr Henning, a taxi driver from Salford, was delivering aid in Syria when he was captured in December near the town of al Dana.
A video released on Thursday showing British journalist John Cantlie, who is also believed to be held by IS.