A hand grenade was thrown into a refugee shelter in Germany overnight as officials said attacks against asylum seekers in the country hit a new level of “hate and violence”.

Police in the southern town of Villingen-Schwenningen said it was “just luck” that the device did not explode when it landed at 1.15am.

Around 20 asylum seekers were sleeping inside the building at the time and were evacuated while a bomb squad destroyed it in a controlled explosion.

Andreas Stenger, of State Office of Criminal Investigation shows a model hand grenade after an attack on a refugee shelter January 29, 2016 in Villingen-Schwenningen, Germany. (Getty Images)

Heiko Maas, the German justice minister, said the attack represented a new level of “hate and violence” that must be addressed by local and federal authorities.

“Grenades are already being thrown at refugee homes - we can't wait until there is someone dead,” he added.

“We need to do everything we can to ensure xenophobic crimes are more rapidly solved and punished more severely.”

A police spokesperson said there were no immediate implications of a motive and that investigators are following “all avenues” as forensic tests and interviews are carried out.

Police officers of the crime scene investigation unit examine a refugee shelter in Villingen-Schwenningen, Germany, 29 January 2016. (EPA)

Attacks targeting refugees on their homes appear to have spiked in Germany following mass sexual assaults carried out mainly by migrants in Cologne on New Year’s Eve.

Several asylum seekers were badly beaten earlier this month after a vigilant group vowed to “clean up” the city, which has also seen thousands-strong protests by Pegida and other far-right groups.

In another assault near Dresden, a man wearing a swastika-emblazoned helmet and “Hitler moustache” attacked two Afghan men while they were sledging, and protesters on a violent rampage through Leipzig started fires and smashed windows.

Germany reacts to Cologne New Year's Eve attacks Show all 13 1 /13 Germany reacts to Cologne New Year's Eve attacks Germany reacts to Cologne New Year's Eve attacks Women protest against sexism outside Cologne Cathedral on 5 January after the assaults Oliver Berg/EPA Germany reacts to Cologne New Year's Eve attacks Women protest against sexism in Cologne following the rash of sex attacks on New Year's Eve Wolfgang Rattay/Reuters Germany reacts to Cologne New Year's Eve attacks Police initially failed to mention the assaults in report the following morning EPA Germany reacts to Cologne New Year's Eve attacks Police officers patrol in front of the main station of Cologne, Germany AP Germany reacts to Cologne New Year's Eve attacks German far-right supporters demonstrate at Cologne`s train station (Reuters) Reuters Germany reacts to Cologne New Year's Eve attacks Supporters of anti-immigration right-wing movement Pegida in Cologne, Germany, January 9, 2016. Reuters Germany reacts to Cologne New Year's Eve attacks Police used pepper spray to control supporters of Pegida, Hogesa (Hooligans against Salafists) and other right-wing populist groups as they protested against the New Year's Eve sex attacks on 9 January, 2016 in Cologne, Germany Reuters Germany reacts to Cologne New Year's Eve attacks Police use a water cannon during a protest march by supporters of anti-immigration right-wing movement Pegida in Cologne, Germany, January 9, 2016 Reuters Germany reacts to Cologne New Year's Eve attacks Police use pepper spray against supporters of anti-immigration right-wing movement Pegida, in Cologne, Germany, January 9, 2016. Reuters Germany reacts to Cologne New Year's Eve attacks Artist Mira Moiré protests naked in Cologne against the mass sex attacks on New Year's Eve AP Germany reacts to Cologne New Year's Eve attacks A demonstrator holds a sign in German that reads 'No violence against women' during a demonstration in the wake of the sexual assaults on New Year's Eve, outside the cathedeal in Cologne, Germany, 09 January 2016. EPA Germany reacts to Cologne New Year's Eve attacks Counter demonstrators hold up a sign reading "Against sexism, against racism" as they protest against a demonstration of the islamophobic movement PEGIDA at the train station in Cologne, Germany, on January 9, 2016. AFP/Getty Images Germany reacts to Cologne New Year's Eve attacks Demonstration by a women’s group on Saturday (AP) AP

Hundreds of incidents and plots had already been recorded before the Cologne assaults – mainly arson attacks on refugee accommodation, where Swastikas and anti-immigration have also been daubed.

Explosives were uncovered by police who prevented a planned neo-Nazi assault on refugee centres with knives, baseball bats and guns in October.

Villingen-Schwenningen lies in Baden-Württemberg – one of two German states that have started taking refugees’ valuables and cash in controversial seizures also seen in Switzerland and Denmark.

Around 1.1 million asylum seekers arrived in Germany last year and the Government is now taking steps to restrict numbers after criticism of Angela Merkel’s decision to welcome all Syrian refugees.