Shocking footage has been released from inside the prison where Islamic State held and tortured dozens of women.

Female prisoners were kept in cells just three feet wide, which were so cramped they could barely stretch out their arms.

Turkish forces stormed the prison in the Syrian town of Al-Bab and freed the terrified women who were being held there.

Turkish forces have released footage from inside the inhumane prison where women were kept as sex slaves, after they stormed the jail in the Syrian town of Al-Bab

The women had been captured and kept as sex slaves, housed like animals in the tiny windowless cells behind huge steel doors.

The women endured inhumane conditions, as the militants forced them to live in darkness and regularly subjected to torture, rape, and beatings.

Soldiers fighting as part of Turkey's military intervention in Syria, code-named Operation Euphrates Shield, seized control of the jail, liberating the women inside.

The Turkish army released footage from inside the prison, exposing the terrible conditions the women were forced to live in.

Meanwhile, a former Islamic State prisoner has photographed himself returning to the cell where he was held captive by Daesh brutes for several months.

While detained in his tiny cell, the Syrian man wrote a poem on the wall.

The female captives were housed like animals, kept in the tiny windowless cells behind huge steel doors

The women had been captured and kept as sex slaves by Islamic State brutes

The town of Al-Bab, in Aleppo province, lies close to Syria's border with Turkey and Turkish forces have been battling to drive militants away.

The Turkish army said 56 Islamic State militants had been killed in the town yesterday by Turkish forces and US-led coalition air strikes.

A spokesman said 11 of the jihadists had been killed in air strikes by coalition forces, while the rest were killed in artillery fire and skirmishes on the ground.

Turkey also said it had taken control of residential areas of Al-Bab after taking out Islamic State targets including vehicles and buildings.

A former Islamic State prisoner took this photo as he returned to the cell where he was once held captive by Daesh brutes for several months. During his time held captive, he wrote this poem on the wall

Turkish defence minister Fikri Isik said the forces were continuing sweeping the area for remaining insurgents, adding that the town, just 15 miles from the Turkish border, would soon be totally cleared of the extremists.

'Al-Bab is almost totally taken under control and (the forces) have entered the center,' Isik said.

'We will be able to say that al-Bab is fully cleared of Daesh once the sweeping activity is concluded.'

The town was the last IS stronghold in the northern Syrian province of Aleppo, and taking back control of Al-Bab is key to wiping out the militant group from its stronghold of Raqqa, Turkish President Tayyip Erdogan said.