New laws to tackle human trafficking and better protect its victims have been passed by the Scottish Parliament.

The Human Trafficking and Exploitation Bill strengthens existing criminal law against the practice and enhances the status of and support for victims.

The Bill creates a specific offence of human trafficking for the first time as well as increases the maximum penalty for offenders to life imprisonment.

Under the proposals, prosecutors will be given guidance from the Lord Advocate setting out a presumption against prosecution in cases where trafficked people have been forced into committing crime.

The legislation also commits Scottish ministers to publishing and updating a human trafficking strategy.

Justice Secretary Michael Matheson said: "Human trafficking and exploitation is a brutal form of organised crime in which adults and children are treated as commodities and ruthlessly exploited for criminal gain, and there is no place for it in a modern Scotland.

"The Bill will clarify and strengthen criminal law by introducing a new and comprehensive single human trafficking offence.

"It gives Scotland's law enforcement agencies further tools in their locker to bring those responsible for human trafficking and exploitation to justice.

"The Bill ensures adult victims of trafficking will now have a statutory entitlement to support and assistance that meets their individual needs."

The legislation also places a duty on ministers to ensure there is a guardian service available for child victims.

"At a time when many children across the world are being displaced as a result of conflict, poverty and persecution, and may fall with a victim to trafficking or exploitation, it seems timely that we are taking these steps to further support young victims of trafficking in Scotland," Mr Matheson said.

Labour's Jenny Marra said the passing of the Bill was a "proud moment" for Holyrood.

The legislation has raised awareness of human trafficking while a consultation on the proposed law received more than 50,000 responses - the third highest of any Holyrood bill, Ms Marra said.

She welcomed the duty on ministers to publish a three-yearly anti-slavery strategy.

"Today is not the end of a process, it is simply the first day in our fight against trafficking in Scotland," she said.

Ms Marra called for training for health workers and social workers to help them identify trafficking victims, and for police officers to have an understanding of the crime so they can "see it, investigate it and refer it up through the legal system".

"Only when our communities are robust like this will the traffickers take note and consider Scotland too risky a place for their crime and human-rights abuses," she said.

Conservative MSP Margaret Mitchell said: "This Bill becomes all the more pertinent given the all too familiar harrowing refugee crisis."

She welcomed changes to the Bill which extend the provision of a guardian to children vulnerable to trafficking.

"Of the thousands of refugees and migrants now travelling in horrendous circumstances to Europe, it is estimated that one in four of these people are children who are not accompanied by an adult," she said.

"These same children are being targeted by traffickers, so in these circumstances it is essential that we do absolutely everything we can to give them the protection they both need and have the right to expect.

"This makes the ability to provide them with a guardian all the more pressing."

Dr Hazel Watson, convener of the Scottish Churches' Anti-Human Trafficking Group, said: "This new legislation will be a powerful deterrent to this atrocious crime in which victims are stripped of dignity and liberty and are forced into working for little pay in awful conditions or as prostitutes, where they are subjected to violence and acts of depravity.

"As we see it, one of the key strengths of the Bill is the recognition of the need for support of victims so that those who survive their ordeal can have the opportunity of recovering and regaining a sense of self-worth."

Charity CARE (Christian Action Research & Education) for Scotland hailed the Bill as a "major step forward in the fight against modern-day slavery".

But it said the failure to ban paying for sex in the legislation was a "glaring one".

CARE for Scotland Parliamentary Officer Dr Gordon Macdonald said: "There is no doubt demand for paid sex is one of the main drivers behind human trafficking and so the Scottish Government should give serious consideration to introducing new legislation to facilitate this at the earliest opportunity.

"Now Scotland has joined the rest of the UK in implementing anti-slavery laws, the work must begin in ensuring they are effectively implemented."