* Shanghai stocks higher, blue-chip CSI300 index up
* Gains in Shanghai stocks led by Xinjiang Bai Hua Cun Co Ltd and losses by Zhejiang Jiahua Energy Chemical Industry Co Ltd
* China's A-shares are at 28.19 percent premium over H-shares
SHANGHAI, March 8 (Reuters) - China stocks rose on Thursday, bolstered by robust trade data, and as Beijing warned of "necessary response" in the event of a trade war with the United States.
** At the close, the Shanghai Composite index was up 0.5 percent at 3,288.41, while the blue-chip CSI300 index climbed 1 percent to 4,077.60. Main sectors rallied across the board on Thursday, led by consumer and healthcare stocks.
** China's exports unexpectedly surged at the fastest pace in three years in February, suggesting both its economy and global growth remain resilient even as trade relations with the United States rapidly deteriorate.
** Trade tensions have jumped to the top of the list of risks facing China this year, with planned U.S. tariffs on steel and aluminium signalling more measures may be on the way, Zhou Hao, senior emerging markets economist at Commerzbank, told the Reuters Global Markets Forum this week.
** China will respond as necessary in the event of a trade war with the United States, Foreign Minister Wang Yi said on Thursday, while warning that such a war would only harm all sides.
** The U.S. tariffs are expected to go into effect in two months, though economists see little immediate impact on China.
** Capital Economics estimates China exports of steel and aluminium to the United States account for less than 0.1 percent of its gross domestic product, as both are already limited by anti-dumping measures.
** "On paper, China has more to lose from a trade war it exports far more to the United States than it imports. There are, however, a few alternative sources for the main products the United States buys from China," the research firm said in a note on Wednesday.
** The largest percentage gainers in the main Shanghai Composite index were Xinjiang Bai Hua Cun Co Ltd, which ended 10.04 percent higher, followed by Tianjin Capital Environmental Protection Group Co Ltd, which closed up 10.04 percent and MeiDu Energy Corp, which ended 10 percent higher.
** The largest percentage losers on the Shanghai index were Zhejiang Jiahua Energy Chemical Industry Co Ltd down 6.43 percent, followed by China Molybdenum Co Ltd losing 4.01 percent and Tongling Jingda Special Magnet Wire Co Ltd down by 3.59 percent.
** About 14.98 billion shares were traded on the Shanghai exchange, roughly 75.2 percent of the market's 30-day moving average of 19.93 billion shares a day. The volume in the previous trading session was 16.87 billion.
** As of 0701 GMT, China's A-shares were trading at a premium of 28.21 percent over the Hong Kong-listed H-shares. (Reporting by Shanghai Newsroom, Editing by Sherry Jacob-Phillips)