For an act to be considered a crime it must have a law defining why it is a crime. Before the law the act was not a crime, enacting a law made the action into a crime. So Law came first.