A drug case that could lead to the decriminalisation of possession for personal use is being debated in Brazil's Supreme Court.

In 2009, an inmate in a Sao Paulo prison was caught with three grams of marijuana. The crime of drug possession was tacked on to his criminal record that included robbery, sale of stolen goods and illegal possession of a gun.

Two years, later the public defender's office in Sao Paulo state filed an appeal on his behalf arguing that the inclusion of drug possession was unconstitutional because it violated the constitutional right to privacy.

The Supreme Court's 11 justices began discussing the case on Wednesday. After about three hours, Chief Justice Ricardo Lewandowski adjourned the session and said debate would be resumed today. A final ruling is not expected for several days.

The use of small quantities of drugs like marijuana and cocaine for personal use is a crime in Brazil. Those caught are often considered traffickers and locked up with hardened criminals or are sentenced to community service.

Justice minister Jose Eduardo Cardozo told the state-run news agency Agencia Brasil earlier this month that those arrested for possession often "enter prison as drug users and come out as traffickers".

The case comes amid calls for the decriminalisation of marijuana possession in Brazil, one of the few countries in Latin America where possession for personal use is still a crime.

Justice Marco Aurelio Mello recently told the newspaper Folha de S Paulo that one issue in the debate would be how to distinguish a user from a trafficker.

Walter Maierovitch, a former judge who once led Brazil's anti-drug programme, called laws that criminalise personal use unconstitutional.

He said: "Acts that do not result in victims cannot be punished. You cannot punish someone for self-harming himself. Someone cannot be the perpetuator of a crime and its victim at the same time."

He said technical criteria must be established to determine the amount of drugs that can be considered small enough for personal use.