KUALA LUMPUR (Reuters) - An Australian mother of three escaped the death penalty on Wednesday after a Malaysian court found her not guilty of drug trafficking.

Maria Elvira Pinto Exposto, 54, was found with more than 1 kg of methamphetamine in her backpack while in transit in Kuala Lumpur enroute to Melbourne from Shanghai in December 2014.

Under Malaysian law, anyone found guilty of possessing more than 50 grams of illegal drugs is considered a trafficker and faces a mandatory death penalty.

The law was amended last month to do away with the mandatory death sentence, allowing judges to use their own discretion. But the changes have not yet come into effect.

Exposto’s lawyers said she was the victim of an internet romance scam and was lured into carrying a bag containing drugs unknowingly by a friend of her online boyfriend, who claimed to be a U.S. soldier serving in Afghanistan.

Slideshow ( 3 images )

“I agreed with the defense’s argument that the accused had no knowledge of the drugs that were in her bag,” Judge Ghazali Cha said on Wednesday.

Exposto’s conduct during her arrest showed “she was naive and her behavior was that of an innocent person,” he said.

The judge referred Exposto to Malaysia’s immigration department for deportation.

“I’m happy now that I’m free,” Exposto said in brief comments to reporters.

Three Australian nationals have been executed by Malaysia for drug trafficking: Kevin Barlow and Brian Chambers in 1986, and Michael McAuliffe in 1993.