China vowed Wednesday to appeal a recent World Trade Organization ruling against its raw materials export policy, a case that could threaten Beijing's stance on rare earths, which it contends is in line with the trade body's rules.

First, we will make an appeal. Second, we still think Chinese practice and policies do not violate WTO rules, Ministry of Commerce spokesman Shen Danyang told reporters at a press briefing when asked whether Beijing would file an appeal.

Shen's comments were the first official acknowledgment that China plans to appeal by the Sept 2 deadline, although most experts had seen such a move as a foregone conclusion.

In July, a WTO legal panel dismissed China's claim that its system of export duties and quotas on raw materials -- used in the production of steel, electronics and medicines -- served to protect its environment and scarce resources.

That ruling was a victory for the United States, the EU and Mexico, which took China to the WTO in 2009, saying export restrictions on raw materials including coke, bauxite and magnesium discriminated against foreign manufacturers and gave an unfair advantage to domestic producers.

It was also seen as a potential precedent against China's stance on its exports of 17 rare earth minerals used to make high-tech goods.

China produces 97 percent of the world's supplies of the crucial industrial inputs, and has begun cutting exports, to the dismay of importers.

Beijing has long held that its rare earth policies are in compliance with WTO rules, and that restrictions are important in conserving its natural resources and protecting its environment.

But importers, including those in the United States and Europe, have complained that China's rare earth policy is unfair, with uneven quotas on exports and domestic consumption of the valuable minerals.

Some countries have argued that China has taken advantage of its near monopoly production of rare earths and slashed exports to drive up prices without effectively limiting domestic production and consumption.

U.S. and EU officials have speculated about filing a complaint against China at the WTO, and some experts have suggested they may be waiting on the raw materials appeal to run its course before borrowing it as precedent.

It is unclear what grounds China's raw materials appeal might take, but it has asserted in the past that under article 20 of the General Agreement on Tariffs and Trade a country can limit exports for special purposes such as conservation.

If you are going to argue on environmental grounds, you would have to have been even-handed in the past and applied the same constraints at home. If you haven't done that, well then you can't change it, said Chin Leng Lim, a professor of law at the University of Hong Kong.

In the meantime, China says it is going to great pains to consolidate and rein in its polluting rare earths industry.

Five years ago you would say China had no experience even arguing a case. They are learning as they go along and now they have learned something about article 20, Lim said.

(Editing by Ken Wills)