One December night three years ago, more rain fell over Cumbria than ever recorded before. Simon Peet’s farm in Langwathby, near Penrith, was one of 600 across the county that took a battering. Twenty of his Herdwick sheep drowned when the River Eden burst its banks, up to 4km of fencing was destroyed and 5,000 tons of gravel from the river ended up in one of his fields. The repair bill was £38,700.

Twenty-five miles up the road, by the River Derwent near Keswick, Steven Clark, a sheep farmer, was bracing himself for the worst after Storm Desmond. But while nearby bridges had collapsed and the army had been called in to help 5,500 people flooded out of their homes, Clark’s farm in the village of Braithwaite was fine. The year before he had been persuaded to take part in an experimental project with a paper mill in Workington, which involved planting 28 acres of willow crop. He is convinced it saved his land.

Owned by the Swedish firm Iggesund, which makes premium cardboard packaging for the likes of Toblerone and L’Occitane, the mill had just invested £108m in a biomass plant. They were keen to move away from fossil fuels and needed a sustainable source of wood chips for fuel. Determined to keep their carbon footprint low, the firm looked local. A study had concluded that willow trees would be the best energy crop – they are quick to grow (six inches in a week is not unusual) and don’t have particularly deep roots (a concern for farmers trying to grow other crops nearby) – and Clark was one of the first to sign up.

Iggesund paperboard mill uses locally grown willow to help fuel their biomass boiler. Photograph: Christopher Thomond/The Guardian

When he went out to survey the damage, he got on the phone to Neil Watkins, the alternative fuels manager at Iggesund, and decided to pull his leg. “He said: ‘Neil, can you go and pick up my sheep? They’ve been washed away to Workington,’” Watkins recalls. “He was joking. They all survived. There were islands of stones and railway sleepers in his fields but they had all been stopped in their tracks by the willow.”

Clark had planted the willow the previous year and it wasn’t yet ready for harvesting. But it had already paid dividends in terms of flood mitigation, slowing the flow by intercepting rain and impeding the flow of water over ground and in the soil.

Protecting farmland against flooding was not the reason Iggesund started signing up farmers to its “grow your income” scheme back in 2013. Then, the focus was on feeding the biomass plant, which requires 600,000 tonnes of fuel a year. Discovering willow’s role as a flood barrier was “a happy byproduct”, says Ulf Löfgren, the managing director of the Workington mill. “We hadn’t thought of it from day one.”

Willow chippings provide fuel to help power the paper mill. Photograph: Christopher Thomond/The Guardian

The financial benefits are not insignificant: farmers can expect to earn £230-250 per acre per year, says Watkins, and prices are guaranteed for 22 years. It is a real boon in an increasingly marginal business, says Peet, who now makes most of his money not from farming but renting out his land. He’s given up trying to make money from Herdwick wool: it costs £1.20 to shear a sheep and yet the going price for a fleece is just 20p. And don’t get him started on the rock-bottom prices demanded by supermarkets.

Growing willow appealed for a number of reasons: “I’m interested in renewable energy, so fuelling the biomass plant appealed. Flood mitigation was obviously a factor and I am also keen to stop being reliant on subsidies,” Peet says. He will start earning money when the first 40 acres of willow are harvested next year and he is already planning to plant another 30 acres.

Towards the coast near Cockermouth, Jan Wilkinson had only been growing grass on her farm after the death of her partner, Mark Weir, in 2011. Since he was killed in a helicopter crash, she had devoted her time to their three children and Honister slate mine, the only working slate mine in England, and needed something low maintenance.

Ian Watkins, right, Iggesund’s alternative fuel manager, with Jan Wilkinson at her willow plantation on the river Cocker in Cumbria. Photograph: Christopher Thomond/The Guardian

Based upstream from Cockermouth, which was badly affected by Storm Desmond, she sees her new crop as performing a community-service role, catching debris before it hits the town and slowing the speed of water on the floodplain. The money will be nice when it comes, she says. “But there’s more to life than pound, shillings and pence. This is making the land more productive and it’s more ecological.”

She is also delighted at the increased biodiversity brought by the willow: “I love seeing the deer, the dares, the songbirds, the herons.” According to Robert Woods from the Teesside Environmental Trust, willow attracts 266 insect species, including 173 types of moths and 51 different kinds of beetle. Insects such as bees and overwintering butterflies also use the willow catkins (spiky flowers) as an early-season nectar source.

The Department for the Environment, Food and Rural Affairs said: “Natural flood management measures, working individually or alongside the government’s record investment in capital schemes, play an important role in our strategy where they offer a viable way of reducing risk.”

It has put £15m into a national flood management programme testing interventions across England, including £2.5m in Cumbria.