ALBANY - The state’s highest court ruled yesterday that criminal activity traditionally ascribed to gangs cannot be prosecuted under the anti-terrorism statutes enacted in the wake of the Sept. 11, 2001, attacks by Muslim extremists.

The Court of Appeals not only found in its 6-0 decision that Bronx prosecutors improperly invoked the anti-terrorism law against Edgar Morales, a member of a street gang known as the St. James Boys, but that by pursuing their terrorism-themed prosecution, they “unduly prejudiced” Morales by tying him to years of criminal activities by other members of his gang unrelated to the offenses at issue.