Migrants and their homes in Germany faced more than 3,500 attacks in 2016, a number that is “alarmingly high and cause for concern,” a German official said Monday, adding that the crimes are being aggressively prosecuted and the numbers of such attacks are falling.

Most of the attacks were crimes such as vandalism targeting homes of asylum seekers — including far-right graffiti, threats and slander — but the report also included more serious attacks such as arson, bodily harm and attempted murder. It was compiled by the Interior Ministry with information from Germany’s 16 states in response to a question in Parliament by the Left Party.

“There was a very wide spectrum of crimes . . . every one is to be condemned,” said Interior Ministry spokesman Johannes Dimroth.

The attacks led to 560 people being injured, including 43 children. Overall, 2,343 suspects were identified and investigated, according to the report.

Comparison figures for previous years have not been compiled, but Dimroth said that after 2016 the “trend is downward . . . which gives us a little bit of hope.”

Germany took in 890,000 asylum seekers in 2015, and the influx caused a backlash and a rise in anti-immigrant sentiment, which was most pronounced in eastern parts of the country.

The government has invested more resources into fighting xenophobic crimes, but the new figures show more needs to be done, said Gauri van Gulik, deputy Europe director of Amnesty International.

“We need to see better risk assessments, more protection at certain locations, thorough investigations and prosecutions of these appalling racist attacks to stop them in the future,” van Gulik said.

Dimroth said that in addition to government policies and police enforcement, it is up to society in general to fight racism, saying it is impossible to just “ban” extremism.

“All of society has the responsibility to establish a climate where extremism finds no fertile ground,” he said.

The number of asylum seekers in Germany tapered off to 280,000 in 2016. With the decrease, and more intensive government efforts to rapidly send home those whose applications are rejected, anti-immigrant sentiment has ebbed somewhat.

The government also has been working to more rapidly integrate those who are allowed to stay.

With a national election planned for September, it seems likely that the nationalist and anti-immigrant Alternative for Germany party, or AfD, will have more than enough support to win seats in Parliament for the first time, even though recent polls have shown a steady decline in support.