Tesco has agreed a deal to donate all the unsold food from its stores to charity.

The supermarket giant announced plans to work with 5,000 local charities across the UK in an initiative that aims to eradicate all its food waste by the end of 2017.

It said the plan followed a "farm to fork" commitment to tackle food waste by its suppliers.

The latest figures released by the company show 55,400 tonnes of food were thrown away at its stores and distribution centres across the country in 2015.

The plan is part of a nationwide roll-out of a 14-store pilot programme called the Community Food Connection.

The project, which lasted over six months, has provided more than 22 tonnes of food for vulnerable people - the equivalent of 50,000 meals.

The plan is part of a nationwide roll-out of a 14-store pilot which has already provided 50,000 meals for vulnerable people (Getty Images)

The roll-out began in 15 big cities and regions, including Manchester, Birmingham, Southampton and Portsmouth, this week and will gradually be introduced in all stores.

It is the second major retailer to announce a major food waste initiative after Morrisons announced its own distribution scheme using "community champions" last year which has now been rolled out nationwide.

Tesco has partnered with food waste FareShare to launch a digital open platform called FareShare FoodCloud which allows staff and charities to liaise to distribute surplus food.

They are appealing for 5,000 charities and community groups to join up and receive the food.

The supermarket has also called on other retailers to adopt the FareShare FoodCloud to create an industry-wide platform.

Tesco chief executive Dave Lewis said: "We believe no food that could be eaten should be wasted. That's why we have committed that no surplus food should go to waste from our stores.

UK supermarkets ranked by value for money Show all 10 1 /10 UK supermarkets ranked by value for money UK supermarkets ranked by value for money 1. Waitrose Getty Images UK supermarkets ranked by value for money 2. Aldi Getty Images UK supermarkets ranked by value for money 3. Sainsbury's Getty Images UK supermarkets ranked by value for money 4. Marks & Spencer UK supermarkets ranked by value for money 5. Lidl Getty Images UK supermarkets ranked by value for money 6. The Co-op Getty Images UK supermarkets ranked by value for money 7. Morrisons Getty Images UK supermarkets ranked by value for money 8 = Asda Getty Images UK supermarkets ranked by value for money 8 = Tesco BRISTOL, ENGLAND - NOVEMBER 18: (EDITORS NOTE: This image was created using digital filters) The Tesco sign is displayed outside a branch of the supermarket on November 18, 2015 in Bristol, England. As the crucial Christmas retail period approaches, all the major supermarkets are becoming increasingly competitive to retain and increase their share of the market. (Photo by Matt Cardy/Getty Images) Getty UK supermarkets ranked by value for money 10. Iceland Getty Images

"We know it's an issue our customers really care about, and wherever there's surplus food at Tesco stores, we're committed to donating it to local charities so we can help feed people in need."

FareShare chief executive Lindsay Boswell said: "We are delighted to be offering our store level solution in partnership with Tesco who are demonstrating real leadership in tackling food surplus.

Mixed reaction to French plans to force supermarkets to donate unsold food

"FareShare FoodCloud is a natural extension of our work together which has already provided nine million meals to help feed vulnerable people."