Image caption China is accused of unfairly keeping its currency low to help its exporters

China has warned that a US bill aimed at penalising it for currency manipulation could "harm relations" between the two economic giants.

A Chinese foreign ministry spokesperson said China was "resolutely opposed" to the bill, which treats undervalued currencies as illegal export subsidies.

China is accused of keeping the yuan artificially low to help its exporters.

The bill has been voted through by the US House of Representatives, but still needs Senate and presidential approval.

"Using the [yuan] exchange rate issue as an excuse to engage in trade protectionism against China can only harm China-US trade and economic relations, and will have a negative effect on both countries' economies and the world economy," warned spokeswoman Jiang Yu, speaking at a regular press briefing.

She also urged US congressmen to "resist protectionism".

Trade rules

If it becomes law, the bill will allow the US Commerce Department to impose tariffs on Chinese imports, if it deems the yuan to be "fundamentally undervalued".

Those tariffs would also need the approval of the World Trade Organization (WTO).

But speaking to China's state-run news agency, Yao Jian, a spokesman for China's Ministry of Commerce, said US attempts to use the exchange rate to justify trade restrictions would violate WTO rules.

He also warned that the US had as much to lose from a trade war as China, with China is now the US's fastest-growing export market.

The Chinese government also argues that its trade surplus with the US does not demonstrate that the current yuan-dollar exchange rate gives it an unfair advantage, pointing out that it has similar trade surpluses with other Asian countries.

Even if the bill is not finally approved, it is likely to increase pressure on both the US and China to resolve the long-running disagreement over the yuan.

On Wednesday, China's central bank promised to increase flexibility in the exchange rate, three months after ending its policy of pegging the yuan to the dollar.

But there has been frustration among business groups and politicians in the US that the yuan has risen by only 2% in that time.

Analysts estimate the yuan is currently undervalued by up to 25% against the US dollar.