A Hollywood police officer who responded to a complaint about juveniles drinking alcohol and smoking had no right to demand the name of a teenager who appeared to be drunk, an appeals court ruled this week.

In a decision that prosecutors said would make it harder for police to do their jobs, the Fourth District Court of Appeal ruled that the teenager, identified only by the initials G.T., did not criminally resist the officer because he was not "engaged in the lawful execution of a legal duty."

According to the appeals court's written decision:

The girl, 13, was part of a group of teenagers hanging out at a Hollywood apartment complex in mid-2011. The officer saw them and noticed that one member of the group, not G.T., was holding an empty bottle of Bacardi Silver, an alcoholic malt beverage.

When the teenagers tried to walk away, the officer stopped them. He then noticed the teenagers had "red, glossy eyes and slurred speech."

G.T. was the only one in the group who declined to give her name, citing her right to remain silent. She was later convicted of resisting arrest without violence and disorderly intoxication.

The officer erred, according to the appeals court, by stopping the girl before he concluded she was drunk. The Bacardi Silver bottle gave him reason to stop the person holding it, but no one else, according to the ruling. Without a reason to detain the girl before she was determined to be drunk, the officer did not have the right to demand she identify herself.

The convictions were overturned.

"This ruling would appear to narrow the scope of how an officer can carry out an investigation," said prosecutor Maria Schneider, whose office handled the case. The Broward State Attorneys Office is considering whether to ask the appeals court to reconsider its decision.