Majorities of people in countries that have accepted many of the world’s migrants say that immigrants strengthen their countries rather than burden them, according to a Pew Research Center survey. And on several questions, Americans offered more positive opinions on immigrants than those in other countries.

A median of 56 percent of people said immigrants were a strength to their country, while 38 percent said immigrants were a burden. In the United States, opinion didn’t differ much from countries overall: 59 percent said immigrants make the country stronger, while 34 percent said immigrants are a burden.

The Pew Research survey was conducted in spring 2018 in 18 countries, which contain 51 percent of the world’s migrant population. Anti-immigrant sentiment has become a driver in elections from the United States to the United Kingdom and beyond. The poll comes out as leaders from Washington to Rome have sought to restrict the flow of migrants into their countries.

People were more divided over whether immigrants are willing to assimilate. Across the countries surveyed, 45 percent said immigrants “want to adopt our country’s customs and way of life” while 49 percent said they “want to be distinct from our society.” Japan stood out, with 75 percent who said that immigrants want to adopt the Japanese way of life. In Hungary and Italy, 10 percent said the same. Americans were more likely to say immigrants want to adopt U.S. customs (54 percent), higher than in most countries surveyed.

Across the countries, 50 percent said immigrants are no more to blame for crime than other groups, while 37 percent said immigrants are more to blame for crime than others. Americans were more likely to say that immigrants were not more to blame for crime, with 77 percent who said they were not more to blame than others. Overall, opinion was split over immigrants increasing terrorism, with 48 percent saying that immigrants do not increase the risk of terrorism in their country and 46 percent saying they do. Americans were more likely to say immigrants do not increase the risk of terrorism, with 56 percent who said they didn’t to 39 percent who said they did.

Majorities in many of the countries studied thought immigrants in their countries illegally should be deported, including 7 of the 10 European Union countries surveyed. In all, 61 percent said immigrants who have entered the country illegally should be deported, and 35 percent opposed deportation. Americans were more divided about deportation — opinions were about split in the United States.

The Pew Research Center Global Attitudes Survey was conducted via telephone and face-to-face interviews. Detailed methodology for each country is available here.