An unprecedented two-year long deportation campaign on undocumented migrant workers in Saudi Arabia has involved widespread and "serious abuses," said US NGO Human Rights Watch (HRW) in a report released on Sunday.

The 36-page document details a catalog of human rights violations including violent attacks by vigilante groups, squalid and overcrowded conditions at migrant detention centers, and severe physical abuse of detainees by guards.

Since the crackdown began in April 2013, more than half a million of Saudi's estimated 2 million undocumented workers — mostly from Somalia, Ethiopia, and Yemen — have been detained and deported. Since November last year migrants have been deported at an average of 2,000 per month.

Many of the detainees that HRW spoke to, including those who handed themselves in voluntarily, reported being held in cramped unhygienic detention centers that lacked basic amenities such as beds, water, food, and medical care. While Yemeni detainees were typically deported within a day or so, migrants from other countries were often kept for weeks or even months waiting for an exit visa.

Saudi Arabia's 9 million migrants have long had second-class status in the Gulf Kingdom where a kafala system ties foreign workers to specific employers, who are able to forbid them from changing jobs and prevent them from leaving the country. The kafala system, which is used by all Gulf states except for Iraq, has faced widespread condemnation from the international community for creating slave-like conditions for migrant workers.

Speaking about his 57-day detention Mohammed, a deportee from Somalia, told researchers there was so little food in one center that inmates fought each other for it. There were only two toilets for more than 1,200 people, including dozens of children, he said.

Another woman from Somalia described how she and her two young sons were held in an "extremely hot" room with around 150 people for more than a week. "My son was vomiting and his stomach was extremely bloated," she told HRW. "There were no mattresses, people just slept on the floor."

Beatings and verbal abuse of detainees were also reported to be commonplace. Nagi, a 57-year-old Yemeni agricultural worker, told researchers that he witnessed a detention center guard beat around 20 men with a cable, while telling them "dogs are better than you."

Sadiyo, a Somali woman in her ninth month of pregnancy, reported being beaten across the back with a baton by a Saudi policewoman while waiting in line at the airport, before giving birth in the aircraft's cabin during the flight back to Mogadishu just hours later.

The severity of ill treatment in detention centers meant several migrants had to seek medical treatment once back in their country of origin. The International Organization for Migration in Mogadishu, the capital of Somalia, said that it had treated many returnees for psychological and physical trauma as a result of prolonged detention in substandard conditions. One health worker told HRW she treated a one-year old boy, held with his father for a month, for diarrhea, malnutrition, and anemia.

Adam Coogle, one of HRW's researchers who interviewed Yemeni migrants at the Saudi border, described their condition as destitute. "These guys really had nothing," he told VICE News. "They'd had their phones confiscated, whatever possessions they had were taken. They had absolutely nothing left,"

HRW has also criticized a lack of official investigations into citizen-led violence against migrants since the crackdown began, including one incident where a crowd of vigilantes "armed with sticks, swords, machetes, and firearms" allegedly attacked foreign workers, while police either stood by or joined in. At least three Ethiopians are thought to have been killed by the lynch mob.

Coogle called the crackdown and recent violence against migrants in the kingdom unprecedented. "There is also a risk that some of those being deported are being sent back to places such as Mogadishu where they face yet further abuses," he added, noting that Saudi Arabia currently had no formalized system for making asylum claims.