WASHINGTON — The Supreme Court ruled on Monday that Congress had not meant to authorize prosecutions of minor crimes under a chemical weapons treaty.

“We are reluctant to ignore the ordinary meaning of ‘chemical weapon,’ ” Chief Justice John G. Roberts Jr. wrote for six justices, “when doing so would transform a statute passed to implement the international Convention on Chemical Weapons into one that also makes it a federal offense to poison goldfish.”

The decision was unanimous, but three justices did not join the majority’s reasoning. They said they would have rested the decision on constitutional grounds, saying that the chemical weapons law covered minor crimes but that Congress had overstepped its constitutional authority by enacting it.

Chief Justice Roberts said constitutional concerns figured in the decision, but only as “background assumptions.” Since Congress would not lightly alter the constitutional balance between the federal government and the states, he said, the law should not be read to “convert an astonishing amount” of local criminal conduct into matters for federal law enforcement.