WASHINGTON—A federal court ruled Tuesday that the federal government can’t keep collecting fees for nuclear-waste storage until it finds a way to store the waste, delivering a victory to nuclear-power operators.

Since the early 1980s, the government has collected more than $30 billion from nuclear-power operators to pay for the eventual storage of the spent fuel from nuclear reactors. But owing to longstanding political disputes, the hoped-for permanent storage site in Nevada’s Yucca Mountain has never been built. That has left the operators of nuclear-power plants on the hook for storing their waste, while they continue to pay for a permanent solution.

The U.S. Court of Appeals for the District of Columbia Circuit ruled that the Energy Department must stop collecting fees until there is a plan to deal with nuclear waste. Further, the court said that pegging the fees to the hypothetical cost of storing waste in Yucca Mountain isn’t fair because the Obama administration has stopped work on the project.

“Until the [Energy] Department comes to some conclusion as to how nuclear wastes are to be deposited permanently, it seems quite unfair to force petitioners to pay fees for a hypothetical option, the costs of which might well—the government apparently has no idea—be already covered,” the court ruled.

The National Association of Regulatory Utility Commissioners, which had challenged the fees, applauded the decision.

“Nuclear-power rate payers should not be charged for a program the federal government has closed down,” said Charles Gray, the association’s executive director. “Thankfully, because of today’s actions, nuclear-power consumers will no longer have to pay for the government’s mishandling of this program.”

The Energy Department said it was reviewing the ruling, and declined to comment further.

Operators pay 0.1 cent per kilowatt hour of electricity generated at nuclear power plants, or about $750 million a year, to cover costs of the eventual storage of spent nuclear fuel, according to the Nuclear Energy Institute, an industry trade group that was a co-petitioner on the lawsuit.

“The court’s decision should prompt Congress to reform the government’s nuclear-waste disposal program,” said Ellen Ginsberg, the group’s general counsel.

Since 1982, when Congress passed the Nuclear Waste Policy Act, the federal government has sought to create a permanent repository for the long-lived nuclear waste. Under law, Yucca Mountain in Nevada is the designated site. But Senate Majority Leader Harry Reid, a Nevada Democrat, is a staunch opponent of the project, and the Obama administration essentially pulled the plug on the site’s development in 2009.

Recently, the same court ordered the Nuclear Regulatory Commission to complete the licensing review for Yucca Mountain that is mandated by law. Tuesday’s ruling is another judicial shot across the bow for the stalled waste program.

The Obama administration’s recommendations for nuclear-waste storage include the creation of an interim, above-ground facility in the next decade, and the construction of a permanent, underground waste repository by midcentury. But Congress ultimately has to pass legislation to resolve the waste question.

The court ruling stressed that nuclear operators still will “ultimately pay for the cost of their waste disposal,” but it said that amount cannot be determined today.

Write to Keith Johnson at keith.johnson@wsj.com