Even before the Hungary disaster, Baotou authorities had begun a program to reinforce the levee here. Huge bulldozers are adding a thick surface layer of crushed stone to the embankments to protect them from the region’s harsh weather.

But the bottom of the reservoir was not properly lined when it was built decades ago, according to a rare earth engineer who insisted on anonymity because of the Chinese government’s sensitivity about the problem. The sludge, he said, has caused a slowly spreading stain of faint but detectable radioactivity in the groundwater that is spreading at a rate of 300 yards a year toward the Yellow River, seven miles to the south.

Much of the radioactivity associated with rare earths comes from the element thorium, which is not a rare earth but is typically found in the same ore. With the exception of unusual clay formations in southern China that contain medium and heavy rare earths with virtually no thorium, every other known commercial-grade rare earth deposit in the world is laced with thorium.

In Australia, engineers and lawyers have been working for three decades to find a safe, legal way to produce rare earths from a very rich deposit in the center of the country at Mount Weld. The mine’s current owner, Lynas Corporation, hopes to begin small-scale production there late next year, although technical challenges remain.

The only American rare earths mine, the Molycorp complex at Mountain Pass, Calif., was at one time the world’s leading producer. That was before it leaked faintly radioactive fluid into the nearby desert in the late 1990s, causing a costly cleanup that contributed to the mine’s closing in 2002. By then, very low Chinese prices had made the mine less economically viable.

Now Molycorp, which raised money in a public stock offering this past summer, is hoping to re-open the mine with higher safety and environmental standards. And it is betting that new technologies can drive its operating costs lower than the level of Chinese mines. Large-scale production, though, may still be several years away.

The mines of southern China are essentially free of thorium and have rare earths that are easily separated from the clay by dumping the ore in acid. But this relatively easy process, and soaring prices on the world market, has led to the development of many illegal mines, which sell to organized crime syndicates that pay for rare earth concentrate with sacks of cash.