WASHINGTON ― A federal court has stymied the state of Wisconsin’s effort to drug test food stamp applicants.

Wisconsin Gov. Scott Walker (R) championed the drug test policy as he launched a doomed presidential bid in 2015. The Obama administration said federal law doesn’t allow states to drug test food stamp recipients, so the Walker administration asked a federal court to decide.

Federal Judge Charles Clevert said Wisconsin filed its complaint too soon, arguing it hadn’t actually implemented the drug testing policy and given the Obama administration a chance to reject it formally.

“It is unclear how Wisconsin will implement the drug-testing program and what, if any, additional issues may or may not arise from it,” Clevert wrote in his Sept. 28 decision.

The Walker administration did not immediately respond to a request for comment. A spokesperson for U.S. Department of Agriculture, which is the federal agency that oversees the Supplemental Nutrition Assistance Program, did not directly address the ruling in an emailed statement, instead saying that better employment and training programs reduce poverty and SNAP spending.

In response to the lawsuit last year, Agriculture Secretary Tom Vilsack told HuffPost that Walker didn’t understand federal law.

“It’s always a good idea before you start litigation to understand what the law is,” Vilsack said then.

One of the largest safety net programs in the U.S., SNAP serves 45 million Americans and is commonly called food stamps. Republicans in several states have sought to implement drug testing requirements, only to be thwarted by federal rules that bar states from adding new conditions for eligibility.

Republicans in Congress have proposed changing the law but have been blocked by Democrats, who say drug testing proposals are designed to shame the poor.

More than a dozen states have added drug testing provisions to the federal Temporary Assistance for Needy Families program, which serves a far smaller population but does allow states to tinker with eligibility requirements. The Walker administration had hoped to argue that SNAP recipients could be considered “welfare recipients” ― i.e., TANF recipients ― for the purposes of drug testing.

CORRECTION: A previous version of this story incorrectly stated an appeals court dismissed the Walker administration’s complaint. It was the District Court for the Eastern District of Wisconsin.