Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

BERLIN — German lawmakers passed a bill Thursday that will make it easier for victims of sex crimes to file criminal complaints if they rejected their attacker's advances with a clear "no."

The move was partly spurred by a nationwide outcry over a string of sexual assaults that happened in the western city of Cologne over the New Year holiday.

"In the past there were cases where women were raped but the perpetrators couldn't be punished," German Minister for Women Manuela Schwesig said. "The change in the law will help increase the number of victims who choose to press charges, lower the number of criminal prosecutions that are shelved and ensure sexual assaults are properly punished."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Campaigners called for a change in Germany's laws on sexual violence. JORG CARSTENSEN / AFP - Getty Images

German law previously required victims to show that they physically resisted attack before charges for rape and other sexual assaults could be brought. Women's rights campaigners argued that Germany's failure to recognize the principle of "no means no" was one of the main reasons for low reporting and conviction rates for rape in the country.

According to figures cited by Heiko Maas, the country's justice minister, only one in 10 rapes in Germany is reported and just 8 percent of rape trials result in convictions.

Related: Germans' Views on Foreigners Change After Cologne Sex Attacks

Conservative lawmakers had previously resisted changing the law until a string of attacks in Cologne sparked a fresh debate about sexual violence. Authorities said most of the attacks were carried out by asylum-seekers, leading some to question whether last year's influx of young men from predominantly Muslim countries could be properly integrated in Germany.

Others noted that Germany lagged behind most Western nations in its definition of rape and that sexual assaults were a feature of German society before large numbers of migrants arrived last year.

A defendant covers his face in court in Cologne, Germany, Thursday - one of the first suspects to go on trial for sexual assault following a large number of complaints from women on New Year's Eve. MARIUS BECKER / EPA

Under the new law, prosecutors and courts can take into account that a victim didn't resist assault because they were incapacitated, surprised or feared greater violence if they objected.

It also allows authorities to more easily deport foreigners convicted of sexual assaults — a measure seen as a direct result of the Cologne attacks.

Prosecutors received more than 1,100 criminal complaints following the Cologne assaults, including about 500 allegations involving sexual crimes. The first trial for sexual assault — against two men from Algeria and Iraq — began Thursday.