Rishi Sunak said badger culls “have to be part of the solution” for preventing the spread of bovine TB during a General Election campaign visit to a farm.

He also said it has been “a real privilege” to understand the contribution farmers make to society.

The Prime Minister, who was joined by Lord David Cameron, said at a Q&A with farmers in North Devon: “Now, I grew up in Southampton, and I didn’t come from a farming background. So it’s been a real privilege to understand the contribution that you make to our society.”

On the culling of badgers to prevent the spread of bovine TB among cattle, Mr Sunak, who is standing for the Conservatives in Richmond and Northallerton, said: “The success of the badger culls where we’ve done them have brought the incidence rates down by just over 50 per cent, so that shows that that plan is working.

“I believe in the science. And yes, of course a vaccine is good and we’re investing in research and development but that is going to take some time. So culls have to be part of the solution.

“And particularly when it comes to badgers, when you look around the world, there’s no country that I think I know of where they’ve eliminated TB in cattle without eliminating it in, whether it’s possums or badgers or the equivalent wildlife, which is why I think culls are important.”

Mr Sunak and Lord Cameron struggled to feed sheep during the campaign visit.

“Come on,” the Prime Minister said as the flock ran to the other side of the pen.

“They don’t want to play ball,” a farmer accompanying Mr Sunak said. “I think they thought we were their shearers,” the Prime Minister joked.

Reacting to the visit, the Liberal Democrats said Mr Sunak’s courting of farmers is “too little too late”.

The party’s rural affairs spokesperson Tim Farron said: “This Devon dash is too little too late for Rishi Sunak. Farmers and rural voters are deserting him in massive numbers.

“Farmers have been utterly taken for granted by the Conservative Party, left to cope with sky-high bills, bungled policies and botched overseas trade deals.

“Liberal Democrats will stand up for people in rural areas and give them the fair deal they badly need through a £1bn rural rescue package. It’s clear that people are moving away from the Conservatives and backing the Liberal Democrats in many seats to kick them out of office.”

Earlier, the Conservatives accused Labour of “treating rural communities with contempt” by not including a promise to maintain the farming budget in its manifesto.

The party also claimed Labour had a “secret plan” to increase taxes on farmers because it had not explicitly ruled out abolishing an exemption from inheritance tax for agricultural properties.

The Conservatives have pledged to maintain the agricultural property relief on inheritance tax, raise the farming budget to £1bn and implement a legally binding food security target.

Environment Secretary Steve Barclay said Labour would “cut our farmers off at the knees” as his party criticised Labour for not including the words “rural” or “fishing” in its manifesto.

Mr Barclay said: “Keir Starmer has demonstrated that he doesn’t care about farmers, rural communities, domestic food security – or indeed anyone outside of his London bubble.”

He added: “It’s the same old Labour, treating rural communities with contempt.”

But a Labour spokesperson said the claims were “yet more desperate nonsense from a Conservative Party that has lied throughout this campaign”.

They added: “Our rural communities have been abandoned by this Conservative government. Working families in rural communities face low pay and the highest personal tax burden since the Second World War.

“Farmers have been undercut by poorly negotiated trade deals, locked behind unnecessary trade barriers blocking the export of high-quality produce and face skyrocketing energy prices forcing thousands out of business.

“It’s time for change. Labour will give rural communities their future back.”

Labour has promised a “New Deal for Farmers”, including promises to protect farmers in trade deals and boost food security, saying “food security is national security”.