An attempt to invalidate a New York State law that all but bans the sale of ivory in the state hit a major hurdle Friday, after U.S. District Judge Lorna Schofield of the Southern District of New York dismissed the plaintiffs' suit for lack of standing.

The Art and Antique Dealers League of America and The National Antique and Art Dealers Association of America brought the lawsuit last year over the state law, passed in 2014, that made it a felony to buy, sell or trade ivory.

While the statute provided a narrow exemption for antiques, the groups argued the law was unconstitutional. They argued that the state law was pre-empted by federal law, and that the state restrictions represent a violation of commercial free speech under the First Amendment. The suit sought a declaratory judgment to void the law, and a permanent injunction to prevent its enforcement.

The groups claim members who “have an economic and professional interest in, among other things, the purchase, sale, distribution or trading of antique elephant ivory,” according to court filings. Even so, state attorneys filed a cross-motion to dismiss for lack of subject-matter jurisdiction and failure to state a claim on behalf of the defendant, Department of Environmental Conservation Commissioner Basil Seggos.

In her eight-page opinion, Schofield found the plaintiffs failed to sufficiently prove standing on multiple fronts.

First, she said the groups lacked associational standing because they failed to sufficiently show their members would otherwise have standing to sue on their own. Neither organization even alleged that an identified member has suffered or will suffer harm because of the ivory ban. Similarly, the amended complaint failed to sufficiently allege that the groups themselves have suffered an injury because of the law.

Schofield went on to dismiss claims by the groups that First Amendment challenges to criminal statutes are justiciable as long as the fear of criminal prosecution under the statute alleged to be unconstitutional isn't imaginary or wholly speculative.

But for that to happen, Schofield ruled, the organizations would have to have shown some kind of standing. As neither did, she granted the state's motion to dismiss.

Despite the defeat, the court offered the plaintiffs the possibility of repleading, after filing a proposed new complaint showing the changes from the dismissed ones, with an explanation of how the issues raised in the dismissal order were cured.

In a statement, the groups' attorney, McLaughlin & Stern partner Alan Sash, said his clients respect the court's decision and plan to amend their complaint accordingly.

Press officers for the New York Attorney General's Office did not immediately respond to requests for comment.