Arresting photos of men suspected of fighting on behalf of Isis in Mosul being held in overcrowded and stifling hot conditions in a nearby prison have emerged as the Iraqi security forces struggle to clear the city of militants.

The site south of the city is currently home to 370 detained men, an official at the facility told visiting AP reporters, who photographed dozens of men crammed into small, dark, unventilated rooms in daytime temperatures exceeding 45 degrees C.

His staff had been overwhelmed by the number of prisoners brought to the facility by the US-backed coalition forces as they sweep the city clean of militants after a gruelling nine-month-long campaign.

Hundreds of suspected Isis members swept up by Iraqi forces in Mosul are being held in a cramped and stifling prison just outside the city (AP)

“Prisoners are infected with diseases, lots of health and skin problems, because they're not exposed to the sun,” the official said, speaking on condition of anonymity.

“The majority can't walk. Their legs are swollen because they can't move.”

One prisoner said that to his knowledge at least two fellow detainees had died at the facility. Several more had gone to hospital with pus oozing out of their wounds and come back with amputated arms and legs, he claimed.

The prison south of Mosul has seen 1,150 detainees pass through in the last three months, the official in charge said, while another 540 had been sent to Baghdad. Over 3,000 are thought to be held at other facilities in Nineveh province.

For many Iraqi soldiers and civilians, there is very little sympathy for those accused of fighting with Isis.

Detainees protest their innocence. Oganisations such as Human Rights Watch have repeatedly accused Iraqi forces of unlawful interrogations, beatings and even executions of men and boys believed to be Isis which could amount to war crimes (AP)

But detainees protest their innocence - and organisations such as Human Rights Watch have repeatedly accused Iraqi forces of unlawful interrogations, beatings and even executions of men and boys believed to be Isis which could amount to war crimes.

“You won't find 10 real (Isis members) among these guys. And all of them have spent more than six months here,” one prisoner who said he was a civil servant told the AP out of earshot of his guards.

“They said my name was in their database. I haven't seen any court or judge. I don't even know what I'm accused of. A lot of names are the same,” he said.

Drone footage shows the devastation in Mosul's old city and the destroyed al-Nuri Mosque

“We really want to die,” another said. “None of us have received any visitors, relatives, family members. They don't even know where we are.”

Iraqi prime minister Haider al-Abadi declared earlier this month that Mosul had been freed from Isis, which overran the city from neighbouring Syria in 2014.