German lawmakers have voted in favour of a strict new rape bill that will allow sex crime victims to file criminal complaints if they reject their attackers with a clear "no".

The "no means no" law comes after hundreds of alleged sexual assaults took place in the west German city of Cologne during New Year's Eve celebrations.

German minister for women, Manuela Schwesig, said: "In the past there were cases where women were raped but the perpetrators couldn't be punished. 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."

According to Justice Ministry figures, only one in 10 rapes in Germany is reported and just 8 per cent of rape trials result in a conviction. 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.

Eva Hoegl, a lawmaker of the centre-left Social Democrats, dismissed criticism that it's difficult to prove in court if someone said "no" when there are no independent witnesses.

She said similar concerns were raised before marital rape was criminalised in 1997. In future, if a member of a group carries out a sexual assault, others in the group can also be prosecuted for failing to intervene.

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

The measure was criticised as unworkable and possibly unconstitutional by legal experts.

The new law also allows authorities to more easily deport foreigners who are convicted of sexual assaults, a measure seen as a direct result of the Cologne attacks. Prosecutors in Cologne received more than 1,100 criminal complaints following the New Year's assaults, including about 500 allegations involving sexual crimes.