Hong Kong's top court has quashed attempts by the city's government to prosecute people for rioting or illegal assembly even without being present at the scene — a ruling lawyers described as a landmark.

The five-judge panel in Hong Kong's Court of Final Appeal, headed by Chief Justice Andrew Cheung, unanimously rejected on Thursday an earlier ruling by a lower appeal court that people, such as supporters, could be criminally liable without being actually present under the common law doctrine of "joint enterprise."

Criminal lawyers said Thursday's ruling was highly significant, impacting future prosecutions, and will be closely scrutinised amid an intensifying national security crackdown in the former British colony.