Sweden has adopted a law requiring people to get explicit consent before sexual contact. Otherwise it will be considered as rape.

In Wednesday's vote, Swedish lawmakers approved the change by 257 votes to 38, with 54 absentees.

The law, which goes into effect July 1, says "it is no longer necessary for the offender to use violence or threats, or to exploit the victim's particularly vulnerable situation" for rape charges to be brought forward.

In December, Prime Minister Stefan Lofven said when presenting proposals to change the law in line with other countries in Europe that if sex is not voluntary "it's illegal." His deputy Minister Isabella Lovin said the recent #metoo anti-harassment campaign has shown the "need" for new legislation.

Critics say the changes won't lead to more convictions.