BAGHDAD - Thousands of people suspected of having ties to the Islamic State group are facing widespread rights violations in Iraqi custody, a leading international rights group said Tuesday.

Human Rights Watch says some 20,000 people are believed to be in Iraqi custody on suspicion of ties to IS. Many are held in inhumane detention facilities and not granted due process, according to the watchdog's 76-page report based on information gathered in Irbil, Nineveh and Baghdad from November 2016 to July 2017.

As Iraqi ground forces backed by the U.S.-led coalition have slowly retaken nearly all of the territory once held by IS since 2014, thousands of men, women and children suspected of having ties to the group have been arrested and detained.

The prisoners have overwhelmed Iraq's already weak judicial system.

Screening processes are flawed, many detainees are being held in inhumane conditions and suspects are largely being tried under broad counterterrorism laws with harsh sentences, the HRW report stated.

An innocent person wrongfully identified as an IS member in the screening process "may spend months in mass arbitrary detention during the course of their judicial investigation," the New York-based group found.

Prosecuting IS suspects under Iraq's counterterrorism laws is "easier," Human Rights Watch said, as a court would only need to prove membership in IS, rather than establish that individual acts violated Iraqi criminal codes.

Under counterterrorism laws, Iraqi authorities can sentence people who worked as doctors or cooks within IS with the same harsh penalties - including death or life in prison - as IS members who carried out violent acts, the report stated.

However, "this approach makes it less likely that the process will establish a more comprehensive judicial record of the crimes committed," Human Rights Watch warned, ultimately depriving IS victims of justice and potentially undermining future attempts at reconciliation in Iraq.