Farmers are fighting back against activists who break into sheds and abattoirs to take undercover footage of animal suffering. As Belinda Tromp reports, state and federal politicians are moving to protect farmers' privacy with a new legislative framework that echoes hard line 'ag-gag' laws in several US states.

With security cameras and alarms rigged up around his egg farm outside Melbourne, Brian Ahmed thought he was well-prepared for animal activists.

But when they struck a few weeks ago under cover of darkness, he felt he was being raided by 'criminals'.

'We had to come out in the middle of the night to protect our property and our family and I was afraid someone would get hurt,' says Ahmed.

I think it's the dumbest thing that farmers ever did. What you should be doing when you're getting bashed is opening doors, not closing them. Dr Temple Grandin, animal science expert

He says the activists didn't get images from inside the sheds that house his 25,000 hens, pointing out that he doesn't have anything to hide anyway.

At the same time, he's upset that 'some people try to portray us as an industry that mistreats our animals'.

Sue Middleton is another farmer who lives in fear of activists and their motives. Her piggery in Western Australia, housing 560 sows, is what some might call a 'factory farm'.

She's critical of animal activists who she says want to 'create enough community attention to outlaw animal production in the long run'.

One of those activists is vegan Chris Delforce, who set up the Aussie Farms website, aimed at turning consumers away from meat, earlier this year .

His website is funded by crowdsourcing and disseminates material obtained from illegal night raids and covert surveillance at piggeries, poultry farms and abattoirs.

He posts the most graphic footage online with detailed information about the farmers involved, including names, addresses and links to Facebook pages.

'We're about transparency in an industry that relies on secrecy. All of this material is sent to us anonymously. We get the impression there's a growing number of people around the country who are taking it upon themselves to go into these factory farms and these slaughter houses because they feel that there's an injustice happening and that they want to show the world exactly what's happening,' says Delforce.

Even moderate lobby groups like Voiceless believe in the value of illegally obtained video.

'It's an important tool in raising consumer awareness about where their food comes from,' says Voiceless' legal counsel, Emmanuel Giuffre.

In a taste of what's to come, undercover vision and social media have had a dramatic impact on farming.

In 2011 secret footage of an Indonesian abattoir broadcast on ABC TV's Four Corners led to the suspension of live cattle exports to Indonesia.

Over the past five years, a concerted social media campaign against the use of sow stalls in piggeries led to Coles announcing it would only sell 'sow stall free' pork.

Officials have also raided a number of piggeries after the exposure of serious abuse of animals.

This month it was the Australian wool industry on the defensive after secretly filmed footage from shearing sheds emerged, allegedly depicting sheep being punched and hit with electric shears.

Farmers are now fighting back, enlisting state and federal politicians to push through tough new laws against break-and-enter activists.

NSW is amending its Biosecurity Act to restrict farm entry, and while animal activists are not the sole target of the new act, they will be covered by the new laws.

At the same time, the South Australian government is preparing to pass the Surveillance Devices Bill, which seeks to outlaw the use of hidden cameras and microphones on private property.

Federal Agriculture Minister Barnaby Joyce has pledged his support for draft legislation which would make it mandatory to hand over footage of animal abuse to authorities without delay.

However, there are warnings that legislative action could backfire on farmers. The world's best known authority on humane handling of livestock, Dr Temple Grandin, says hardline 'ag-gag' laws in United States have done more harm than good.

'I think it's the dumbest thing that farmers ever did. What you should be doing when you're getting bashed is opening doors not closing them,' she says.

'Basic things like how you raise cattle and pigs and how you slaughter them, that's not private information.'

Dr Grandin says if intensive livestock industries have nothing to hide, they should consider live webcam streaming to the public, citing US examples.

Victorian Farmers Federation communications director Tom Whitty agrees that farmers need to 'reclaim the space to tell the positive stories, that they are human beings that produce world leading food and that they look after their animals'.

For his part, farmer Brian Ahmed says he'd only be willing to open his farm to friendly visitors. 'I'm very proud of the systems we do,' he says. 'It's a family farm. We know how to look after our animals.'

Those feelings are echoed by Sue Middleton: 'A lot of people would call this a factory farm, but our handlers have a personal relationship with all our animals. This is how people want meat produced.'