Japan enacted legislation Friday to promote the reduction of food waste, with the aim of cutting down on the over 6 million tons of still-edible food discarded annually.

Under the legislation, sponsored by a cross-party group of lawmakers, the central government will formulate a basic policy to cut back food waste that will also oblige municipalities to devise their own action plans toward that end.

The legislation also calls for a “national movement” to drive food loss reduction through collaboration between local governments, as well as businesses and consumers.

Images showing large amounts of discarded seasonal sushi rolls went viral on social media last year, leading the farm ministry in January to call on convenience stores and supermarkets to refrain from supplying more products than demand requires.

Adding momentum to the move, major convenience store operators Seven-Eleven Japan Co. and Lawson Inc. said last week they will start discounting rice balls and lunch boxes that are close to their expiration dates by offering customers enrolled in the chains’ loyalty programs shopping credits worth 5 percent of the value of purchases.

The issue is also gaining attention globally, with the agriculture ministers from the Group of 20 major economies agreeing earlier this month in a meeting in Niigata to take a leading role in reducing food waste.

According to the U.N. Food and Agriculture Organization, around 1.3 billion tons of food are wasted every year worldwide. Government data in fiscal 2016 showed 6.43 million tons were wasted in the country and over half of that total came from the commercial sector.