New legislation on cremations, aimed at ensuring that Scotland's baby ashes scandal will never be repeated, has been passed by Holyrood.

MSPs gave their final approval to the Burial and Cremation (Scotland) Bill at the Scottish Parliament on Tuesday.

The law was brought forward after it emerged staff at Mortonhall crematorium in Edinburgh had secretly buried the ashes of babies for decades without their parents' knowledge, raising concerns about practices in other local authorities.

It takes forward many of the recommendations of Lord Bonomy's Infant Cremation Commission, set up in the wake of the scandal.

Public health minister Maureen Watt said there was broad agreement on the need for the legislation and its key provisions.

She said: "This Bill will make important and much-needed changes to burial and cremation processes, and will help to ensure that those processes are easy to understand, reliable and fit for purpose.

"The current legislation continues to reflect older and very different expectations about death and what should be done with human remains.

"It is right that we should put in place legislation that reflects modern Scotland and supports our expectations about the respect and dignity with which human remains should be treated. "I believe that this Bill will do that."

Ms Watt added: "Much of the Bill is based on recommendations by Lord Bonomy's Infant Cremation Commission and it is particularly important that these provisions address problems that have arisen in the past."

She said women affected by a loss would have the opportunity at every step to make decisions about their wishes in relation to remains.

The Bill puts in place a clear process for what should be done with ashes, with cremation authorities placed under a duty to carry out the applicant's wishes, Ms Watt added.

Opposition politicians welcomed the Bill, including many final stage amendments.

Labour's Jenny Marra said: "The minister has made great improvements around the clarity of the process both for the families and also for the health bodies."

She went on to welcome the Scottish Government's acceptance of a Labour amendment which will incorporate guidance to improve the situation in relation to funeral poverty.

"This is just the start of a very important process to try to eradicate funeral poverty in Scotland," Ms Marra added.

In her final contribution to Holyrood before standing down as an MSP, Conservative Nanette Milne said: "There is a great deal of sensitivity surrounding the issues dealt with in this Bill.

"The proposed legislation around cremation should prevent in future the traumas experienced by the many still grieving parents who have no idea what happened to the ashes of their infants and stillborn babies following cremation."

She said: "It would appear that this Bill has widespread support from the bereaved and from those responsible for dealing with the burial or cremation of their loved ones."