Donald Trump has attacked China for using underhanded means to boost its exports at America's expense. But right now, the view from Beijing isn't looking so rosy.

Chinese exports fell 2% last year, according to official data released Friday. That's the biggest annual decline since 2009.

Exports to the U.S. held up better -- they were virtually unchanged from 2015 -- but China's overall trade surplus declined last year for the first time since 2011.

Chinese officials say they're worried about the months ahead, with protectionist rhetoric on the rise from President-elect Trump and other leaders.

"The trend of anti-globalization is increasingly obvious and China has become its biggest victim," said Huang Songping, a spokesman for the Chinese customs agency that reports the country's trade data.

Related: Just how far will Trump go on China and Mexico?

Some economists are also pessimistic.

"It's hard to see conditions becoming much more favorable to Chinese trade than they already are," said Julian Evans-Pritchard, a China expert at Capital Economics. "The likelihood of a damaging trade spat between China and the U.S. has risen in recent weeks following Trump's appointment of hardliners to lead U.S. trade policy."

Trump is set to be inaugurated next week and has said he plans to kick off his presidency by labeling a China currency manipulator. That's largely a symbolic move, but analysts say it could escalate a confrontation with Beijing over trade.

China has, in fact, been spending hundreds of billions of dollars recently to buy its own currency and stop it falling too rapidly, rather than devaluing the yuan to boost exports.

Trump's trade team includes Peter Navarro, an economist who directed a documentary titled: "Death By China: How America lost its manufacturing base;" and Robert Lighthizer, who was part of a Reagan administration trade team that imposed protectionist measures.

Chinese state media have reacted with dismay to those appointments, but government officials have continued to stress the mutual benefits of trade between the world's two largest economies.

Related: China is no longer the biggest foreign holder of U.S. debt

Trump has already strained the relationship between Washington and Beijing by suggesting that the highly sensitive matter of U.S. policy on Taiwan could be used as leverage to "make a deal with China" on trade and other issues.

-- Steven Jiang contributed to this report.