There was a time when Germany’s welcoming attitude toward the hundreds of thousands of refugees entering the country seemed unbreakable.

Two years later, a majority of Germans now say the country has reached its limits and many will mention one specific date when asked to explain why: New Year’s Eve at the beginning of last year. That night, hundreds of mostly immigrant men sexually assaulted women in Cologne and other cities, causing a reconsideration of previous refugee policies.

Abroad, the changing attitudes did not go unnoticed. During his campaign, President Donald Trump used crimes committed by refugees in Germany multiple times as purported evidence to support his own anti-immigration stances. “(You) know what a disaster this massive immigration has been to Germany and the people of Germany – crime has risen to levels that no one thought they would ever see,” Trump said at one rally last August.

But is the assumption that refugees are always more likely to commit crimes than locals justified, based on Germany’s experience over the past two years? Criminologists there say that the answer is more complicated and that Germany’s lessons actually suggest that refugees from the Middle East coming to the U.S. would be unlikely to increase crime rates.

Although a recently leaked report by Germany’s Federal Crime Agency BKA concluded that crimes committed by migrants were on the rise, previous assessments have also revealed a very different trend. Refugees from countries like Syria, Iraq and other war-torn Middle Eastern nations are much less crime-prone than other immigrants. Criminologists say that the numbers match their own research, which suggests that certain groups of migrants in Germany are far more likely to commit crimes than others.

“There is a clear divide between those who have come here for economical reasons, mostly from North Africa, and those who have fled wars,” said criminologist Rudolf Egg. “Many North Africans are young men who have come here alone without realizing that their hopes for staying in Germany will never become reality. They were lured here with false promises.”

Refugees need to provide officials with evidence that their lives are at risk in their home countries to be allowed to stay and to be officially authorized to work.

Being unable to provide such evidence most often does not result in immediate deportation, however. Given the sheer number of migrants who have come to Germany during the past years, authorities have struggled to deport individuals whose asylum applications were rejected – leaving many in a long-term limbo which increases their risk of becoming criminals.

A number of recent cases have put authorities’ struggle to deport rejected asylum seekers into the spotlight of the debate in Germany and elsewhere. Last week, a Ghanaian allegedly raped a 23-year old woman and forced her boyfriend to watch the assault. The incident happened only days after the alleged attacker’s asylum application was rejected.

The suspected Uzbek man responsible for last Friday’s truck attack in Stockholm had also recently been denied asylum, Swedish investigators said.

In some countries, the increase in crimes committed by migrants who face deportation or have little chances of having their asylum applications approved has further been aggravated by other factors.

In the case of Germany, for instance, the influx of nearly 1 million people into the country in 2015 resulted in long waiting times for appointments with ministry officials, creating fear and uncertainty among migrants trapped in the application process and unable to work. Egg and other criminologists said that an increase in crime rates could have been avoided if authorities had preselected new arrivals more systematically in 2015 and 2016.

Daniel Koehler, the director of the German Institute on Radicalization and De-Radicalization Studies, also questioned in an earlier interview whether authorities had thoroughly checked all newly arrived refugees to the extent they said they have. “It is simply impossible for the German authorities to check with Syrian or Iraqi authorities if the claimed identity is correct or if there are any known criminal charges against that person,” he said.

The country is now trying to find a middle path, somewhere between its previous practices and Hungary’s approach where refugees are now being automatically detained when they enter the country.

So far, “for German authorities, the life of a refugee ‘starts’ the moment he or she enters the country,” Koehler said.

Whereas that is likely to present a worrisome challenge to Germany, criminologists have pointed out that the U.S. would be unlikely to see similar increases in crime rates if it were to accept more refugees from war-torn Middle Eastern nations. Contrary to Germany, Middle Eastern refugees arriving in the U.S. are nearly all preselected and have gone through one of the world’s toughest asylum application processes. If they make it to the U.S., their chances of becoming employed are high.

“Given the rigorous background checks in the U.S., the crime rate of those being granted asylum there would probably be very low,” said German criminologist Egg.