THE PEOPLE’S REPUBLIC of China controls 97 percent of the world’s supply of rare-earth metals. Lucky for China — but not so lucky for the rest of the world, because these 17 minerals, with names like europium and neodymium, are used in the manufacture of everything from clean-energy devices to the U.S. military’s precision-guided munitions. That gives China more market power in more critical areas than the United States, Europe and Japan can comfortably afford. The risks became all too evident in 2010 when Beijing suddenly cut off rare-earth exports to Japan during a flare-up of the two countries’ long-standing dispute over maritime boundaries. That de facto embargo lasted only a short while, but China still maintains production limits and export quotas on rare earths.

So President Obama is absolutely right to file a World Trade Organization (WTO) case against China, in partnership with Europe and Japan. China asserts that it has curtailed supply because of concerns that unlimited mining was damaging fragile ecosystems. There’s some truth to that — unregulated rare-earth mining can be devastating to the environment. But industry experts generally agree that China’s principal purpose was to create a competitive advantage for its own manufacturers of advanced products that contain rare earths. If so, that is the sort of behavior China’s membership in the WTO was supposed to discourage. By taking the issue to the WTO, Mr. Obama and the U.S. allies are doing nothing more than exercising their legal right to let a neutral party decide.

Whether the case can lessen U.S. dependence on Chinese rare earths in the short term is another question. Mr. Obama did not claim that his goal was to eliminate the need for imports from China, only to ensure that China maintain a level playing field between China’s buyers of the materials and those in the rest of the world. The Defense Department, which has previously downplayed its dependency on Chinese rare-earths, must still persuade a skeptical Congress that it has a plan to deal with potential supply disruptions.

Rare-earth prices have come down from their 2010 peak, and a U.S. firm, Molycorp, is bringing a large California rare-earth mine into production, which should help restore the United States as a leading producer over the next few years. Molycorp recently took over a Canadian firm that refines rare-earth ore in China, suggesting that some of the U.S. company’s supply could wind up abroad — though the company says Chinese processors will handle only the minority of ore that Molycorp cannot process in the United States. The U.S. government and the private sector here and in Japan and Europe need to continue their efforts to diversify global sources of rare-earths. With luck, this strategic vulnerability will already be easing in a couple of years, which is about how much time it may take for the WTO to rule on the Obama administration’s complaint.