An Indonesian judge has said the possibility of a compensation claim influenced his decision to hand a jail sentence to an Australian teenager on drugs charges.

On Friday the 14-year-old boy from New South Wales was sentenced to two months behind bars after being arrested last month in Bali's Kuta district for marijuana possession.

He has already spent a month-and-a-half in detention, so he is expected to be released and deported on December 4.

Justice Amser Simanjuntak says he took into account that the boy has already been locked up, so if he was not sentenced to jail time he might have been able sue the Indonesian government for compensation.

The judge says he believes the teenager has given Bali a bad name.

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Listen Duration: 5 minutes 6 seconds 5 m Two month jail sentence for Australian teenager in Bali ( George Roberts ) Download 2.3 MB

He says he gave a lenient sentence because of the boy's age and his promise not to use marijuana again.

"The defendant has never committed any crime before," the judge told the Denpasar district court.

"He has always been polite during hearings. He regretted the crime he committed.

"He promised to never repeat the same mistake, and his parents have promised to send him to a rehabilitation centre as he is still in junior high school."

The boy is likely to serve out the remainder of his sentence at an immigration detention centre in Jimbaran, where most people there are either refugees or people who have violated their visas.

But relative to the conditions he could have been kept in, that being Kerobakan prison, the main prison in Denpasar where the Bali Nine and Schapelle Corby are held, the justice minister stepped in and said it was not appropriate.

There is no juvenile facility in Bali, so being held in the immigration centre means the boy's parents will still be able to see and stay with him.

No appeal

The teen's lawyer Mohammed Rifan had asked the court to release the boy so he could return to Australia and undergo rehabilitation for his drug habit.

But despite admitting he was disappointed with the sentence, Mr Rifan says there will be no appeal.

"We suggest to the parents to accept it, for this decision, even if we're disappointed with this decision, because if we appeal we will take more longer and then the boy is still in prison waiting for the process to finish," he said.

"So the possibility we will give the advice to the parents to accept it for the decision.

"We had expected that the boy would be returned to his parents immediately to undergo a rehabilitation program.

"He will serve another seven days or so in jail."

Relief

Lake Macquarie MP Greg Piper says he has spoken by phone to the boy's parents and says they are relieved he did not get a longer sentence or end up in an adult jail.

"Mum and dad have been over there; they've done it very hard. They've stood by their son and I'm very proud of them.

"I know them and I'm looking forward to seeing them home as a family and moving on with their lives.

"Addressing the situation of course, you can just brush this away and say it never happened and I know that they won't do that."