An Australian granny is being sentenced to death for smuggling crystal meth into Malaysia — but she claims she was the victim of an online romance scam.

Maria Elvira Pinto Exposto, 54, was on her way to Melbourne when authorities found more than a kilo (2.2 pounds) of crystal meth sewn inside the lining of her bag at the Kuala Lumpur airport in 2014, The Guardian reported.

The mom of four and grandmother of two said the black backpack was given to her in Shanghai by her boyfriend — whom she had met online, and who claimed to be named Capt. Daniel Smith, a member of the US Special Forces.

Exposto said she thought the bag contained clothing — not drugs — and that she’d even willingly put it through an airport scanner on her layover in Kuala Lumpur.

A judge acquitted her of the drug crime in December 2017 — ruling that Exposto had been groomed by the man for two years and scammed into carrying the bag.

“She was tricked into carrying the bag because of what we now call the internet scam, internet romance,” her lawyer, Shafee Abdullah, told Australia’s ABC.

But prosecutors filed an appeal this year and the courts overturned her acquittal.

She was found guilty of a drug trafficking charge — which carries a mandatory sentence of death by hanging.

“She should have been suspicious,” the prosecution said in their appeal. “There were many opportunities for Maria to scrutinize the bag, which was given to her by someone she met only hours earlier.”

Exposto’s lawyer called the reversal of judgment “perverse” and said he plans to appeal the ruling.

Australia’s Department of Foreign Affairs said it would continue to provide Exposto “full consular assistance.”

“Australia opposes the death penalty in all circumstances for all people,” Foreign Minister Julie Bishop said in a statement to CNN.

Malaysia’s drug laws are notoriously strict — with a mandatory death sentence for anyone found guilty of carrying more than 50 grams (1¾ ounces).