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 IS fighters.
Turkey's Prime Minister Ahmet Davutoglu said they were released after a "pre-planned operation" involving the country's intelligence services.
"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.
One the freed hostages is reunited with their family The release of the hostages came as a full-length propaganda film produced by IS emerged.
It was not immediately clear what Turkey had done to secure the return of the hostages, but independent broadcaster NTV said no ransom was paid and there were no clashes with insurgents during the operation.
President Recep Tayyip Erdogan said: "I thank the Prime Minister and his colleagues for the pre-planned, carefully calculated and secretly conducted operation throughout the night.
"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."
The PM (R) kisses Turkish consul-general Ozturk Yilmaz after his release 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.
Mr Davutoglu did not provide further details on the circumstances of the release, but said it was carried out through "MIT's own methods".
Hostages quizzed by journalists as they got off the plane said they could not go into detail as to the nature of their ordeal, but a couple of them hinted at ill treatment and death threats.
Mr Davutoglu (L) with the freed captives in Ankara Alptekin Esirgun told the state-run Anadolou Agency that militants held a gun to Consul General Ozturk Yilmaz's head and tried to force him to make a statement.
Mr Yilmaz thanked Turkish officials involved in his release but did not give details about their captivity or how they were freed.
He refused to take more questions, saying: "I haven't seen my family for 102 days. All I want to do is to go home with them."
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 IS.
The hostages were taken in Mosul and returned to Sanliurfa The 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.

Ms Witheridge is seen leaving a bar with friends
Syrian refugees crowd a Turkish border fence on Thursday
A jihadist gunman looks at bottles of perfume at a shop in Raqqa, Syria
The Pentagon chief is the latest official to rule out ground forces
A protester is removed as the Defence Secretary testifies before the House
The Islamists took 21 Syrian villages this week, sparking a refugee exodus
A number of images were released by the RAF
It was the first QRA issued at RAF Lossiemouth
Mark Reilly used to run GSKCI
Peter Humphrey's health is said to be poor
A soldier prepares a jet before the strikes
Mr Hollande at the Elysee Palace before announcing the strikes
A sword was removed from one of the properties
A suspect is detained by armed police during the operation
A police forensic expert gathers evidence at a property in Sydney
Police chiefs said the operation highlighted the reality of the threat
President Obama and US Central Command chief, General Lloyd Austin
Secretary of State John Kerry said the group must be stopped "end of story"
A displaced Iraqi child displays his drawing at a refugee camp in Irbil
Shia fighters, who have joined the battle against IS, train in Najaf
Islamic State fighters have seized large parts of Iraq and Syria
Mr Poroshenko speaks during a joint meeting of Congress in Washington
The border is one of the most heavily militarised in the world
Matthew Miller was sentenced to six years hard labour on Sunday
The president met former ebola patient Dr Kent Brantly at the White House
The US has already spent $100m (£62m) in response to the outbreak
Bruce Aylward from the WHO warned the outbreak was 'unparalleled'
A firefighter tackles a blaze after an apparent rocket attack in Donetsk
Ukraine's prime minister warned the country should be ready for battle
Kurdish peshmerga troops participate in a security deployment against IS
The group has made rapid territorial advances across Iraq and Syria
British aid worker David Haines was taken hostage and killed by the group
The group has also taken taxi driver Alan Henning hostage
Militants have released videos depicting mass executions
Mr Poroshenko holds aloft the signed landmark agreement with the EU
A steel factory destroyed by the shelling overnight in Donetsk
Dieudonne M'Bala M'Bala has been prosecuted for anti-Semitism in France
Anelka celebrated a goal by doing the quenelle gesture
The authorities say they have increased security at hotels and other sites
Another photo shows Hurricane Odile closing in on the coast
Residents of the tourist resort and fishing town prepare for the storm 

Mr Hammond and US Secretary Of State John Kerry arriving in Paris
Mr Cameron has vowed to 'hunt down' the 'monsters' who killed Mr Haines
A central part of the plan is to engage Arab countries in the coalition