LONDON, Dec 5 (Thomson Reuters Foundation) - A war on waste food in France, where supermarkets are banned from throwing away unsold food and restaurants must provide doggy bags when asked, has helped it secure the top spot in a ranking of countries by their food sustainability.

Japan, Germany, Spain and Sweden rounded out the top five in an index published by the Economist Intelligence Unit (EIU), which graded 34 nations based on food waste, environment-friendly agriculture and quality nutrition.

It is "unethical and immoral" to waste resources when hundreds of millions go hungry across the world, Vytenis Andriukaitis, EU Commissioner for Health and Food Safety, said at the launch of the Food Sustainability Index 2017 on Tuesday.

"We are all responsible, every person and every country," he said in the Italian city of Milan, according to a statement.

One third of all food produced worldwide, 1.3 billion tons per year, is wasted, according to the U.N.'s Food and Agriculture Organisation.

Food releases planet-warming gases as it decomposes in landfills. The food the world wastes accounts for more greenhouse gas emissions than any country except for China and the United States.

"What is really important is the vision and importance of (food sustainability) in these governments' agendas and policies," Irene Mia, global editorial director at the EIU, told the Thomson Reuters Foundation.

"It's something that is moving up in governments' agendas across the world."

Global hunger levels rose for the first time in more than a decade, last year, with 815 million people, more than one in 10 on the planet, going hungry.

France was the first country to introduce specific food waste legislation and loses only 1.8 percent of its total food production each year. It plans to cut this in half by 2025.

"France has taken some important and welcome steps forward including forcing supermarkets to stop throwing away perfectly edible food," said Meadhbh Bolger, a campaigner at Friends of the Earth Europe.

"This needs to be matched at the European level with a EU-wide binding food waste reduction target."

High-income countries performed better in the index, but the United States lagged in 21st place, dragged down by poor management of soil and fertilizer in agriculture, and excess consumption of meat, sugar and saturated fats, the study said.

The United Arab Emirates, despite having the highest income per head of the 34 countries, was ranked last, reflecting high food waste of almost 1,000 kilos per person per year, rising obesity and an agriculture sector dependent on depleting water resources, it said.