A Danish teen used pepper spray to fight off a man who tried to sexually assault her near an asylum seekers’ center, but since the device is illegal in Denmark, the girl has now been warned by police that she will likely be charged, Danish media reported.

The 17-year-old girl is one of many who, according to media reports, have been carrying self-defense devices since reports emerged about the wave of sexual assaults by groups of Middle Eastern migrants in Germany and elsewhere in Europe over the New Year’s holiday.

It is unknown if the attacker was a migrant. He was described in various media accounts as “English-speaking” and “dark skinned.”

A police officer tries to separate pro-migrants and anti-migrants protesters at the Danish-German border on January 9, 2016 in Krusaa, Denmark. January 9, 2015. The anti-Islamic group SIAD protesting againts migrants claims that the border should be completely closed. (Claus Fisker/AFP/Getty Images)

A police officer tries to separate pro-migrants and anti-migrants protesters at the Danish-German border Jan. 9 in Krusaa, Denmark. (Claus Fisker/AFP/Getty Images)

The girl told police that she was knocked to the ground at about 10 p.m. Wednesday in the coastal town of Sonderborg by the man who then unbuttoned her pants and tried to undress her, The Local reported.

She was able to free herself by using the pepper spray she was carrying, a move that may end up costing her.

“It is illegal to possess and use pepper spray, so she will likely be charged for that,” local police spokesman Knud Kirsten told TV Syd. Britain’s Telegraph reported that the fine in Denmark for carrying pepper spray is about $70.

That police warning unleashed acerbic comments on Danish social media by those upset by the possibility that the victim could face punishment under the law. ”Self-defense is a human right,” one person wrote while others offered to pay her fine.

As for the assailant, he is still at large.

Following the widely reported sexual attacks in Cologne, German merchants have reported a spike in sales of self-defense devices such as pepper spray, blank firing guns, body alarms and high performance flashlights that can momentarily blind attackers.

Right-wing Dutch politician Geert Wilders — a strong opponent of Muslim migration to Europe — over the past weekend handed out fake pepper spray canisters to women, telling them they need to defend themselves against men he described as “Islamic testosterone bombs.”

Because pepper spray is also illegal in the Netherlands, the canisters Wilders distributed contained red paint.

The Local noted that a nightclub in the same town where the teenager was attacked has decided to bar the entry of those who don’t speak Danish, English or German following complaints that women had been harassed by foreigners.

Front-page image via Shutterstock