The Supreme Court on Monday threw out a lawsuit filed by the states of Nebraska and Oklahoma against their neighbor Colorado over a law approved as a ballot initiative by Colorado voters in 2012 that allows the recreational use of marijuana.

The court declined to hear the case filed by Nebraska and Oklahoma, which said that marijuana is being smuggled across their borders and noted that federal law still prohibits the drug.

Two conservative justices, Clarence Thomas and Samuel Alito, said they would have heard the case.

RELATED: Is legal marijuana still a gateway drug?

Nebraska and Oklahoma contended that drugs such as marijuana threaten the health and safety of children and argued that Colorado had created "a dangerous gap" in the federal drug control system.

Colorado stands by its law. It noted that the Obama administration has indicated the federal government lacks the resources and inclination to enforce fully the federal marijuana ban.

"The fact remains – Colorado marijuana continues to flow into Oklahoma in direct violation of federal and state law," Oklahoma Attorney General Scott Pruitt said after the court's action.

Colorado should stop refusing to take reasonable steps to prevent the flow of marijuana outside of its borders and the Obama administration should enforce federal law against marijuana, Pruitt added.

Nebraska Attorney General Doug Peterson expressed disappointment with the Supreme Court's action, but said it does not bar new challenges to Colorado's law in federal court.

Colorado has said that the Supreme Court was not the proper place to resolve the case. The lawsuit by Oklahoma and Nebraska was filed under the court’s rarely used "original jurisdiction," which covers instances in which the justices hear disputes between states that are not first reviewed by lower courts.

Colorado Attorney General Cynthia Coffman said the legal questions surrounding her state's law "still require stronger leadership from Washington."

RELATED: Senate report on legalizing marijuana urges caution

Washington state also voted in 2012 to legalize recreational marijuana use by adults, while Oregon, Alaska and the District of Columbia followed in 2014.

"This was a meritless lawsuit, and the court made the right decision," Mason Tvert of the pro-legalization Marijuana Policy Project said. "States have every right to regulate the cultivation and sale of marijuana, just as Nebraska and Oklahoma have the right to maintain their failed prohibition policies."

Tom Angell, chairman of the Marijuana Majority advocacy group, said legalizing marijuana would allow the Oklahoma and Nebraska criminal justice systems "to focus on real crime, and it will generate revenue that can be used to pay for health care, education and public safety programs."