Revenge porn is to become a criminal offence carrying a penalty of up to two years in prison in Northern Ireland.

England and Wales already have laws outlawing the publication of explicit sexual images and videos of former partners.

Democratic Unionist Alastair Ross proposed the measure, which has been passed by Stormont Assembly members.

Mr Ross said: "It will send a clear message to potential perpetrators that such behaviour will not be tolerated, and hopefully it will provide some assurance to victims that this type of crime is being taken seriously by legislators and the law enforcement agencies."

The law creates a new offence of disclosing private sexual photographs and films with intent to cause distress.

He said intimate photographs or films are initially shared with another individual, often someone who is trusted at the time. Offenders spread them widely, usually on the internet, without their consent and with the intent of causing distress.

He added: "We all now have smartphones capable of taking photographs and videos, all of which can be shared online almost instantly.

"Therefore, I think that the law needs to keep pace with technological changes and recognise the world that we live in today.

"The (Justice) Committee believes that introducing a specific offence to deal with revenge porn will assist the police and the Public Prosecution Service in tackling this obnoxious crime."