ROME — Growing small amounts of marijuana at home for private use is not a crime, Italy’s top court has ruled, putting an end to a yearslong legal dispute and adding Italy to the short list of countries to allow cultivation of recreational cannabis.

A 1990s law prohibits the cultivation and sale of marijuana in Italy, but conflicting court decisions, and a 2016 amendment that opened a loophole in the law, created confusion over how it should be interpreted.

The country’s highest court appears to have settled at least part of the question, writing in a one-page statement of its findings that “at home, small-scale cultivation activities are to be considered excluded from the application of the penal code.”

The judges produced the document on Dec. 19 and it was first publicized on Thursday by the news agency AGI. A full, detailed ruling remains weeks or months away, so the court’s complete reasoning has not been made public.