An Indonesian court has sentenced a German national to five years in prison for smuggling hashish into the resort island of Bali.

Martin Robert Moller was handed the sentence for attempting to smuggle 232 grams (8.2 ounces) of hashish. He was detained by customs officials in December after two capsules containing the drug were found among his belongings as he arrived at Bali airport, according to AFP.

The defendant’s lawyer, Gusti Putu Maya, said Moller has “admitted his mistake and has shown regret”.

“This sentence will prevent him from committing such an act again, and serves as a warning to others thinking of smuggling drugs in Bali,” Judge Sugeng Riyono told the Denpasar District Court.

The sentence comes after Lindsay Sandiford, a British woman, was handed the death penalty in January after smuggling cocaine believed to be worth $2.4 million into Bali.

Indonesia implemented stiff penalties for drug trafficking as part of its crackdown on drugs in the country.