Beijing criticized a decision by Europe's highest court to allow airlines to be charged for carbon emissions on flights to and from the European Union, with state media warning on Thursday it could spark a trade spat and the foreign ministry urging talks.

This is a trade barrier in the name of environmental protection and will strike a wide blow to passenger benefits and the international airline industry, the state-run Xinhua News Agency said in a commentary.

It will be difficult to avoid a trade war focused on an aviation 'carbon tax', said Xinhua, whose editorials generally reflect the official government position.

China's Foreign Ministry stated its opposition less stridently, and urged the European Union to talk with other governments about what happens next.

China has already expressed its position to the EU side many times -- that we oppose the European side unilaterally imposing the airline emissions charge, the Chinese Foreign Ministry spokesman Liu Weimin told a daily briefing.

In fact, many countries have voiced their opposition to the EU scheme, and we hope the European side will act prudently and take a active and practical attitude in appropriately consulting about it with all sides, including China, to deal with the issue.

The European Court of Justice ruled on Wednesday against a group of U.S. airlines that challenged a European law requiring a carbon cap on all airlines flying to and from European Union airports.

Earlier this month, the China Air Transport Association (CATA) urged China's airlines to refuse to take part in the emissions scheme.

CATA says the scheme will cost Chinese airlines 800 million yuan ($123 million) in the first year and more than triple that by 2020.

(Reporting by Terril Yue Jones; Additional reporting by Chris Buckley; Editing by Ed Lane)