The Abusive Behaviour and Sexual Harm Bill was one of the final three bills of the parliamentary session to complete their passage at Holyrood yesterday.

Along with the consolidating Bankruptcy Bill and the Burial and Cremation Bill, it was given an unopposed final vote by the chamber and now goes forward for royal assent.

Among other provisions the bill creates a new offence of sharing private intimate images without consent – so-called revenge porn – and makes it an aggravation that an offence was committed in the context of domestic abuse. It also introduces new protections for victims where a perpetrator is unfit to stand trial or otherwise lacks capacity due to mental disorder.

Conservative spokesperson Margaret Mitchell, and Justice Committee convener Christine Grahame continued to express reservations over the provisions for mandatory jury directions in situations where a complainer has not offered resistance, or reported an alleged offence immediately afterwards, which were opposed by the legal profession and the judiciary, but Justice Secretary Michael Matheson insisted that the provisions mirrored those found in other jurisdictions and that judges retained a discretion as to how to direct a jury in individual cases.

Further consultation is still taking place on how to introduce an offence that would extend domestic abuse to forms of psychological abuse and control which cannot usually be prosecuted under the existing criminal law.

The Burial and Cremation (Scotland) Bill replaces statutes in this area from the 19th century onwards, with reforms to prevent a recurrence of the "baby ashes" scandal.

The Bankruptcy (Scotland) Bill is the result of a Scottish Law Commission project to restate the heavily amended bankruptcy legislation in a single straightforward Act.